From 4b817e3e24903a1fa1959947347ad0dc48a2d59f Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Fri, 27 Jun 2008 06:44:29 +0000 Subject: [PATCH] Use bool() to simplify ObjectProxy.__nonzero__(). svn path=/main/trunk/; revision=10810 --- pym/portage/util.py | 4 +--- 1 file changed, 1 insertion(+), 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 -- 2.26.2