Fix _use_dep.__str__() to work correctly in the case when conditional USE
authorZac Medico <zmedico@gentoo.org>
Tue, 29 Jul 2008 06:44:49 +0000 (06:44 -0000)
committerZac Medico <zmedico@gentoo.org>
Tue, 29 Jul 2008 06:44:49 +0000 (06:44 -0000)
deps have evaluated to nothing (empty string rather than []). Thanks to
ABCD for reporting.

svn path=/main/trunk/; revision=11257

pym/portage/dep.py

index ba22a2b2a74c5a486f084ad7082a904efcdbb82c..54f039a38e386934e31fd5cc53ef455efe2f30b7 100644 (file)
@@ -396,6 +396,8 @@ class _use_dep(object):
                                break
 
        def __str__(self):
+               if not self.tokens:
+                       return ""
                return "[%s]" % (",".join(self.tokens),)
 
        def evaluate_conditionals(self, use):