summaryrefslogtreecommitdiffstats
path: root/src/sbin
diff options
context:
space:
mode:
authorSol Jerome <solj@ices.utexas.edu>2009-08-12 20:52:19 +0000
committerSol Jerome <solj@ices.utexas.edu>2009-08-12 20:52:19 +0000
commit9b60636b5442775a2c61057a632f823efd39a7db (patch)
tree914a0ffe41ff2ce533e535f5663782e639b56f8a /src/sbin
parent7b129585ef707746e399fe888ccfc2706dd2ae5c (diff)
downloadbcfg2-9b60636b5442775a2c61057a632f823efd39a7db.tar.gz
bcfg2-9b60636b5442775a2c61057a632f823efd39a7db.tar.bz2
bcfg2-9b60636b5442775a2c61057a632f823efd39a7db.zip
bcfg2-repo-validate: Fix traceback when reading empty pkgmgr files (Reported by Joe Digilio)
Signed-off-by: Sol Jerome <solj@ices.utexas.edu> git-svn-id: https://svn.mcs.anl.gov/repos/bcfg/trunk/bcfg2@5403 ce84e21b-d406-0410-9b95-82705330c041
Diffstat (limited to 'src/sbin')
-rwxr-xr-xsrc/sbin/bcfg2-repo-validate5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/sbin/bcfg2-repo-validate b/src/sbin/bcfg2-repo-validate
index a59254a80..072029523 100755
--- a/src/sbin/bcfg2-repo-validate
+++ b/src/sbin/bcfg2-repo-validate
@@ -75,7 +75,10 @@ if __name__ == '__main__':
# warn on duplicate Pkgmgr entries with the same priority
pset = set()
for plist in pkg_list:
- xdata = lxml.etree.parse(plist)
+ try:
+ xdata = lxml.etree.parse(plist)
+ except lxml.etree.XMLSyntaxError, e:
+ print("Failed to %s: %s" % (plist, e))
# get priority, type, group
priority = xdata.getroot().get('priority')
ptype = xdata.getroot().get('type')