diff options
Diffstat (limited to 'pym/portage/sets/base.py')
-rw-r--r-- | pym/portage/sets/base.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pym/portage/sets/base.py b/pym/portage/sets/base.py index d58b5f297..216c8cc16 100644 --- a/pym/portage/sets/base.py +++ b/pym/portage/sets/base.py @@ -41,10 +41,13 @@ class PackageSet(object): for x in self._nonatoms: yield x - def __nonzero__(self): + def __bool__(self): self._load() return bool(self._atoms or self._nonatoms) + if sys.hexversion < 0x3000000: + __nonzero__ = __bool__ + def supportsOperation(self, op): if not op in OPERATIONS: raise ValueError(op) |