summaryrefslogtreecommitdiffstats
path: root/reverseVpd.py
diff options
context:
space:
mode:
authorJason Albert <albertj@us.ibm.com>2017-08-23 14:39:10 -0500
committerJason Albert <albertj@us.ibm.com>2017-08-23 14:39:10 -0500
commitc99b75586e259c852d4ca66b62af943452714f83 (patch)
tree99b05d72a48238925b57f76b32f0c9b61c790262 /reverseVpd.py
parent020a8b151dc0447372236d0ad6ccbb508a61d35c (diff)
downloadvpdtools-c99b75586e259c852d4ca66b62af943452714f83.tar.gz
vpdtools-c99b75586e259c852d4ca66b62af943452714f83.zip
xmllint update to README and reverseVpd.py
- xmllint now only called in reverseVpd.py if installed warning thrown if not installed
Diffstat (limited to 'reverseVpd.py')
-rwxr-xr-xreverseVpd.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/reverseVpd.py b/reverseVpd.py
index e8adce3..dff3839 100755
--- a/reverseVpd.py
+++ b/reverseVpd.py
@@ -320,10 +320,13 @@ writeTvpd(vpd, tvpdFileName)
out.msg("Wrote tvpd file: %s" % tvpdFileName)
# Now rip it through xmllint quick to cleanup formatting problems from the ET print
-rc = os.system("xmllint --format %s -o %s" % (tvpdFileName, tvpdFileName))
-if (rc):
- out.error("Unable to call xmllint to fixing xml formatting")
- exit(rc)
+if (os.path.isfile("/usr/bin/xmllint")):
+ rc = os.system("/usr/bin/xmllint --format %s -o %s" % (tvpdFileName, tvpdFileName))
+ if (rc):
+ out.error("Error occurred calling xmllint to fix xml formatting")
+ exit(rc)
+else:
+ out.warn("xmllint not installed - no formatting cleanup done!")
# Write the sub files
if (clCreateRecords):
OpenPOWER on IntegriCloud