From: Zac Medico Date: Fri, 30 May 2008 00:37:34 +0000 (-0000) Subject: Fix Atom attribute handling in get_operator() and dep_getslot() to account X-Git-Tag: v2.2_pre8~65 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=cc6093e21371923dbf953b7137d7deae50d5dd65;p=portage.git Fix Atom attribute handling in get_operator() and dep_getslot() to account for None return values. svn path=/main/trunk/; revision=10497 --- diff --git a/pym/portage/dep.py b/pym/portage/dep.py index 993c23bdd..efabee262 100644 --- a/pym/portage/dep.py +++ b/pym/portage/dep.py @@ -427,8 +427,8 @@ def get_operator(mydep): @return: The operator. One of: '~', '=', '>', '<', '=*', '>=', or '<=' """ - operator = getattr(mydep, "operator", None) - if operator is not None: + operator = getattr(mydep, "operator", False) + if operator is not False: return operator if mydep: mydep = remove_slot(mydep) @@ -502,8 +502,8 @@ def dep_getslot(mydep): @rtype: String @return: The slot """ - slot = getattr(mydep, "slot", None) - if slot is not None: + slot = getattr(mydep, "slot", False) + if slot is not False: return slot colon = mydep.find(":") if colon != -1: