From: Zac Medico Date: Mon, 6 Sep 2010 21:43:30 +0000 (-0700) Subject: Fix parse_metadata_use() to allow use elements containing no flag X-Git-Tag: v2.2_rc76~4 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=84238b2d0912c68cc679d11ec1240140bb314da1;p=portage.git Fix parse_metadata_use() to allow use elements containing no flag elements since the DTD allows it. Thanks to Mark Loeser for reporting. --- diff --git a/pym/repoman/utilities.py b/pym/repoman/utilities.py index e957c84b2..5d32e0ce9 100644 --- a/pym/repoman/utilities.py +++ b/pym/repoman/utilities.py @@ -128,7 +128,8 @@ def parse_metadata_use(xml_tree): for usetag in usetags: flags = usetag.findall("flag") if not flags: - raise exception.ParseError("missing 'flag' tag(s)") + # DTD allows use elements containing no flag elements. + continue for flag in flags: pkg_flag = flag.get("name")