summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2010-08-26 15:54:44 -0700
committerZac Medico <zmedico@gentoo.org>2010-08-26 15:54:44 -0700
commit666c4e75360313c0297d54b86f6bb07ef6b3f764 (patch)
tree11d41922003e5a353ab07a9ada65861d8dbfdb5d
parent4d842d101d54fd2641aa7fd6f74be904ecf43011 (diff)
downloadportage-666c4e75360313c0297d54b86f6bb07ef6b3f764.tar.gz
portage-666c4e75360313c0297d54b86f6bb07ef6b3f764.tar.bz2
portage-666c4e75360313c0297d54b86f6bb07ef6b3f764.zip
Make parse_metadata_use() tolerate empty flag descriptions.
-rw-r--r--pym/repoman/utilities.py9
1 files changed, 1 insertions, 8 deletions
diff --git a/pym/repoman/utilities.py b/pym/repoman/utilities.py
index 6dbdeddcd..50576d9b9 100644
--- a/pym/repoman/utilities.py
+++ b/pym/repoman/utilities.py
@@ -133,9 +133,6 @@ def parse_metadata_use(xml_tree):
pkg_flag = flag.get("name")
if pkg_flag is None:
raise exception.ParseError("missing 'name' attribute for 'flag' tag")
- if flag.text is None:
- raise exception.ParseError("missing USE description with " + \
- "the 'flag' tag (name=%s)" % pkg_flag)
# emulate the Element.itertext() method from python-2.7
inner_text = []
@@ -152,11 +149,7 @@ def parse_metadata_use(xml_tree):
stack.append(obj.tail)
stack.extend(reversed(obj))
- pkg_flag_value = " ".join("".join(inner_text).split())
- if not pkg_flag_value:
- raise exception.ParseError("missing USE description with " + \
- "the 'flag' tag (name=%s)" % pkg_flag)
- uselist[pkg_flag] = pkg_flag_value
+ uselist[pkg_flag] = " ".join("".join(inner_text).split())
return uselist
class UnknownHerdsError(ValueError):