diff options
author | Zac Medico <zmedico@gentoo.org> | 2008-05-30 00:37:34 +0000 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2008-05-30 00:37:34 +0000 |
commit | cc6093e21371923dbf953b7137d7deae50d5dd65 (patch) | |
tree | c64ceea42f22938829c50d4fbfacfd69cbc951d0 | |
parent | 60e059b93342bf178f1059db21dbef5f7edda844 (diff) | |
download | portage-cc6093e21371923dbf953b7137d7deae50d5dd65.tar.gz portage-cc6093e21371923dbf953b7137d7deae50d5dd65.tar.bz2 portage-cc6093e21371923dbf953b7137d7deae50d5dd65.zip |
Fix Atom attribute handling in get_operator() and dep_getslot() to account
for None return values.
svn path=/main/trunk/; revision=10497
-rw-r--r-- | pym/portage/dep.py | 8 |
1 files changed, 4 insertions, 4 deletions
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: |