diff options
author | Sol Jerome <solj@ices.utexas.edu> | 2009-08-12 20:52:19 +0000 |
---|---|---|
committer | Sol Jerome <solj@ices.utexas.edu> | 2009-08-12 20:52:19 +0000 |
commit | 9b60636b5442775a2c61057a632f823efd39a7db (patch) | |
tree | 914a0ffe41ff2ce533e535f5663782e639b56f8a /src | |
parent | 7b129585ef707746e399fe888ccfc2706dd2ae5c (diff) | |
download | bcfg2-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')
-rwxr-xr-x | src/sbin/bcfg2-repo-validate | 5 |
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') |