summaryrefslogtreecommitdiff
path: root/users
diff options
context:
space:
mode:
authorAlec Warner <antarus@gentoo.org>2008-08-13 17:00:06 +0000
committerAlec Warner <antarus@gentoo.org>2008-08-13 17:00:06 +0000
commitaa4095f3da80ad12f0f01d5961f8acd71e905e91 (patch)
tree273669a5ccbf808704400c9acd3d0fec3348be62 /users
parentversion bump 9.2 to 9.3 (diff)
downloadgentoo-aa4095f3da80ad12f0f01d5961f8acd71e905e91.tar.gz
gentoo-aa4095f3da80ad12f0f01d5961f8acd71e905e91.tar.bz2
gentoo-aa4095f3da80ad12f0f01d5961f8acd71e905e91.zip
completed untested fix for parsing errors reported by cardoe when parsing individual files; should log to stderr and return empty dict (basically skipping that file for all intents and purposes.
Diffstat (limited to 'users')
-rw-r--r--users/antarus/projects/infra/use_desc_gen.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/users/antarus/projects/infra/use_desc_gen.py b/users/antarus/projects/infra/use_desc_gen.py
index 5f3efe32d4..1eb2820941 100644
--- a/users/antarus/projects/infra/use_desc_gen.py
+++ b/users/antarus/projects/infra/use_desc_gen.py
@@ -118,7 +118,12 @@ def GetLocalFlagInfoFromMetadataXml(metadata_file):
d = {}
- dom_tree = minidom.parseString(metadata_file.read())
+ try:
+ dom_tree = minidom.parseString(metadata_file.read())
+ except xml.paraser.expat.ExpatError e:
+ logging.error('%s (in file: %s)' % (e, metadata_file))
+ return d
+
flag_tags = dom_tree.getElementsByTagName('flag')
for flag in flag_tags:
use_flag = flag.getAttribute('name')