repoman: handle ElementTree.ParseError
authorZac Medico <zmedico@gentoo.org>
Fri, 17 Dec 2010 20:12:54 +0000 (12:12 -0800)
committerZac Medico <zmedico@gentoo.org>
Fri, 17 Dec 2010 20:12:54 +0000 (12:12 -0800)
bin/repoman

index 1e1b1467acb13804aa62e0d2618b49dcda3f61f8..c43493b99f14f22448ae09ff4fc0441332963999 100755 (executable)
@@ -1391,7 +1391,7 @@ for x in scanlist:
                                os.path.join(checkdir, "metadata.xml"),
                                parser=xml.etree.ElementTree.XMLParser(
                                        target=_MetadataTreeBuilder()))
-               except (ExpatError, EnvironmentError) as e:
+               except (xml.etree.ElementTree.ParseError, ExpatError, EnvironmentError) as e:
                        metadata_bad = True
                        stats["metadata.bad"] += 1
                        fails["metadata.bad"].append("%s/metadata.xml: %s" % (x, e))