diff options
author | Jason Albert <albertj@us.ibm.com> | 2017-08-23 14:39:10 -0500 |
---|---|---|
committer | Jason Albert <albertj@us.ibm.com> | 2017-08-23 14:39:10 -0500 |
commit | c99b75586e259c852d4ca66b62af943452714f83 (patch) | |
tree | 99b05d72a48238925b57f76b32f0c9b61c790262 /reverseVpd.py | |
parent | 020a8b151dc0447372236d0ad6ccbb508a61d35c (diff) | |
download | vpdtools-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-x | reverseVpd.py | 11 |
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): |