From: Zac Medico Date: Fri, 27 Jun 2008 06:44:29 +0000 (-0000) Subject: Use bool() to simplify ObjectProxy.__nonzero__(). X-Git-Tag: v2.2_rc2~311 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=4b817e3e24903a1fa1959947347ad0dc48a2d59f;p=portage.git Use bool() to simplify ObjectProxy.__nonzero__(). svn path=/main/trunk/; revision=10810 --- 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