parse_metadata_use(): omit empty text tokens.
authorMichał Górny <mgorny@gentoo.org>
Thu, 3 Feb 2011 20:49:31 +0000 (21:49 +0100)
committerZac Medico <zmedico@gentoo.org>
Fri, 4 Feb 2011 05:02:04 +0000 (21:02 -0800)
pym/repoman/utilities.py

index 9d4898e8a99d1c4c7334b1ef7de495da0a9269f6..ceb1ba17dc7a5d5c250fa5dc46b68575a31a9a54 100644 (file)
@@ -157,7 +157,8 @@ def parse_metadata_use(xml_tree):
                                uselist[pkg_flag] = {}
 
                        # (flag_restrict can be None)
-                       uselist[pkg_flag][flag_restrict] = " ".join("".join(inner_text).split())
+                       uselist[pkg_flag][flag_restrict] = " ".join( \
+                                       [x for x in "".join(inner_text).split() if x])
 
        return uselist