projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ab3a77f
)
Use bool() to simplify ObjectProxy.__nonzero__().
author
Zac Medico
<zmedico@gentoo.org>
Fri, 27 Jun 2008 06:44:29 +0000
(06:44 -0000)
committer
Zac Medico
<zmedico@gentoo.org>
Fri, 27 Jun 2008 06:44:29 +0000
(06:44 -0000)
svn path=/main/trunk/; revision=10810
pym/portage/util.py
patch
|
blob
|
history
diff --git
a/pym/portage/util.py
b/pym/portage/util.py
index 821513ae67e01ee447f041766a5328a2c96db7d9..af99adedd04d5e09ea85235f55320bf1fc921c4e 100644
(file)
--- 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