summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Albert <albertj@us.ibm.com>2015-09-02 10:29:18 -0500
committerJason Albert <albertj@us.ibm.com>2015-09-02 10:29:18 -0500
commit021ec99776b2a210e4a698c38f85ecd9797afdcb (patch)
tree1aabb830af37b0313b4605e40dd06def2ab38992
parentdfab584eb8bb0e83bd4a2810860eb10473e2d57f (diff)
downloadvpdtools-021ec99776b2a210e4a698c38f85ecd9797afdcb.tar.gz
vpdtools-021ec99776b2a210e4a698c38f85ecd9797afdcb.zip
Cleaned up code comments
-rwxr-xr-xcreateVpd.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/createVpd.py b/createVpd.py
index f434d83..35ef031 100755
--- a/createVpd.py
+++ b/createVpd.py
@@ -328,7 +328,7 @@ rc = 0
################################################
# Command line options
# Create the argparser object
-# We disable auto help options here and add them manually below. This is we can get all the optional args in 1 group
+# We disable auto help options here and add them manually below. This is so we can get all the optional args in 1 group
parser = argparse.ArgumentParser(description='The VPD image creation tool', add_help=False, formatter_class=argparse.RawDescriptionHelpFormatter,
epilog=textwrap.dedent('''\
Examples:
@@ -651,7 +651,7 @@ for record in manifest.iter("record"):
# --------
# Verify that the data isn't longer than the length given
- # Future checks could include making sure hex data is hex
+ # Future checks could include making sure bin data is hex
if (kwformat == "ascii" or kwformat == "bin"):
if (len(kwdata) > kwlen):
out.error("The length of the value is longer than the given <kwlen> for keyword %s in record %s" % (keywordName, recordName))
@@ -978,9 +978,11 @@ out.msg("Wrote vpd file: %s" % vpdFileName)
if (imageSize > maxSizeBytes):
out.error("The generated binary image (%s) is too large for the size given (%s)"%(imageSize, maxSizeBytes))
errorsFound += 1
+
# Catch the errors
if (errorsFound):
out.msg("")
out.error("%d error%s found while creating the binary image. Please review the above errors and correct them." % (errorsFound, "s" if (errorsFound > 1) else ""))
+
# Return the number of errors found as the return code
exit (errorsFound)
OpenPOWER on IntegriCloud