diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-06-27 06:44:29 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-06-27 06:44:29 +0000 |
commit | 4b817e3e24903a1fa1959947347ad0dc48a2d59f (patch) | |
tree | 20baba7e4e18046e75b9a67e1a5e21fbe436178b | |
parent | ab3a77f3bf1a5435193aa1af51a8590b35b4a6b0 (diff) | |
download | portage-4b817e3e24903a1fa1959947347ad0dc48a2d59f.tar.gz portage-4b817e3e24903a1fa1959947347ad0dc48a2d59f.tar.bz2 portage-4b817e3e24903a1fa1959947347ad0dc48a2d59f.zip |
Use bool() to simplify ObjectProxy.__nonzero__().
svn path=/main/trunk/; revision=10810
-rw-r--r-- | pym/portage/util.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/pym/portage/util.py b/pym/portage/util.py index 821513ae6..af99adedd 100644 --- a/pym/portage/util.py +++ b/pym/portage/util.py @@ -969,9 +969,7 @@ class ObjectProxy(object): return object.__getattribute__(self, '_get_target')() != other def __nonzero__(self): - if object.__getattribute__(self, '_get_target')(): - return True - return False + return bool(object.__getattribute__(self, '_get_target')()) class LazyItemsDict(dict): """A mapping object that behaves like a standard dict except that it allows |