summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Albert <albertj@us.ibm.com>2015-03-16 11:05:01 -0500
committerJason Albert <albertj@us.ibm.com>2015-03-16 11:05:01 -0500
commitbe559eab01e0975f1abeb35eae6df2bc1986603d (patch)
tree8c81213f3f1b2bf6fa26149e18cc8300be0ca371
parente5220897e8b74696d17ccf0baed5dce2fbeb1473 (diff)
downloadvpdtools-be559eab01e0975f1abeb35eae6df2bc1986603d.tar.gz
vpdtools-be559eab01e0975f1abeb35eae6df2bc1986603d.zip
Added a check to make sure rdesc was given
-rwxr-xr-xcreateVpd.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/createVpd.py b/createVpd.py
index f739c58..87ac93d 100755
--- a/createVpd.py
+++ b/createVpd.py
@@ -185,12 +185,17 @@ def parseTvpd(tvpdFile, topLevel):
out.error("For record %s, 0 tags of type keyword, rbinfile or rtvpdfile was given!" % (recordName))
out.error("1 tag of the 3 must be in use for the record to be valid!")
errorsFound+=1
+ # Make sure the rdesc is available
+ if (recordTags["rdesc"] != 1):
+ out.error("The tag <rdesc> was expected to have a count of 1, but was found with a count of %d for record %s" % (keywordTags["rdesc"], recordName))
+ errorsFound+=1
# Do some checking of what we found at the vpd level
if (topLevel == True):
comparer = 1
else:
comparer = 0
+ # Don't go thru all of them, "record" has special handling below
for tag in ["name", "size", "VD"]:
if (vpdTags[tag] != comparer):
out.error("The tag <%s> was expected to have a count of %d, but was found with a count of %d" % (tag, comparer, vpdTags[tag]))
OpenPOWER on IntegriCloud