portage.dep.Atom.violated_conditionals(): Fix "not / is None" bug
authorSebastian Luther <SebastianLuther@gmx.de>
Sun, 8 Aug 2010 19:10:22 +0000 (21:10 +0200)
committerZac Medico <zmedico@gentoo.org>
Mon, 9 Aug 2010 00:34:35 +0000 (17:34 -0700)
pym/portage/dep/__init__.py

index 0ee52218d8d98826fb91b2f451d25f19034782dd..542c17680b934c4e94ad2e37267d670715983116 100644 (file)
@@ -519,9 +519,9 @@ class _use_dep(object):
                tokens.extend(x for x in self.enabled if x not in other_use)
                tokens.extend("-" + x for x in self.disabled if x in other_use)
                if conditional:
-                       if not parent_use:
+                       if parent_use is None:
                                raise InvalidAtom("violated_conditionals needs 'parent_use'" + \
-                                       " parameter for conditional flags: '%s'" % (token,))
+                                       " parameter for conditional flags.")
                        tokens.extend(x + "?" for x in conditional.enabled if x in parent_use and not x in other_use)
                        tokens.extend("!" + x + "?" for x in conditional.disabled if x not in parent_use and x in other_use)
                        tokens.extend(x + "=" for x in conditional.equal if x in parent_use and x not in other_use)