summaryrefslogtreecommitdiffstats
path: root/pym/portage/locks.py
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2008-07-01 12:38:49 +0000
committerZac Medico <zmedico@gentoo.org>2008-07-01 12:38:49 +0000
commit83499617458a93217e8f1ed5194c16f2b3bedc40 (patch)
tree3337cac977a844506cc7ac03fa046a65ec130c9b /pym/portage/locks.py
parent3ab46b943befdd480b24c3d459555011dd04e120 (diff)
downloadportage-83499617458a93217e8f1ed5194c16f2b3bedc40.tar.gz
portage-83499617458a93217e8f1ed5194c16f2b3bedc40.tar.bz2
portage-83499617458a93217e8f1ed5194c16f2b3bedc40.zip
Py3k compatibility patch #1 by Ali Polatel <hawking@g.o>.
Replace dict.has_key() calls with "in" and "not in" operators.. svn path=/main/trunk/; revision=10870
Diffstat (limited to 'pym/portage/locks.py')
-rw-r--r--pym/portage/locks.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/pym/portage/locks.py b/pym/portage/locks.py
index c6d22c1c5..279804475 100644
--- a/pym/portage/locks.py
+++ b/pym/portage/locks.py
@@ -289,9 +289,9 @@ def hardlock_cleanup(path, remove_all_locks=False):
host = "-".join(hostpid[:-1])
pid = hostpid[-1]
- if not mylist.has_key(filename):
+ if filename not in mylist:
mylist[filename] = {}
- if not mylist[filename].has_key(host):
+ if host not in mylist[filename]:
mylist[filename][host] = []
mylist[filename][host].append(pid)
@@ -301,7 +301,7 @@ def hardlock_cleanup(path, remove_all_locks=False):
results.append("Found %(count)s locks" % {"count":mycount})
for x in mylist:
- if mylist[x].has_key(myhost) or remove_all_locks:
+ if myhost in mylist[x] or remove_all_locks:
mylockname = hardlock_name(path+"/"+x)
if hardlink_is_mine(mylockname, path+"/"+x) or \
not os.path.exists(path+"/"+x) or \