projects
/
portage.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
dbc9f3c
)
lockfile: use hasattr() instead of dir()
author
Zac Medico
<zmedico@gentoo.org>
Thu, 9 Jun 2011 15:43:40 +0000
(08:43 -0700)
committer
Zac Medico
<zmedico@gentoo.org>
Thu, 9 Jun 2011 15:43:40 +0000
(08:43 -0700)
pym/portage/locks.py
patch
|
blob
|
history
diff --git
a/pym/portage/locks.py
b/pym/portage/locks.py
index 50a92006129e295138b608960b9a8627504c88c6..9ed1d6a6cfb0bfe6e7325ec412f249f1824fc37f 100644
(file)
--- a/
pym/portage/locks.py
+++ b/
pym/portage/locks.py
@@
-114,7
+114,7
@@
def lockfile(mypath, wantnewlockfile=0, unlinkfile=0,
try:
locking_method(myfd, fcntl.LOCK_EX|fcntl.LOCK_NB)
except IOError as e:
- if
"errno" not in dir(e
):
+ if
not hasattr(e, "errno"
):
raise
if e.errno in (errno.EACCES, errno.EAGAIN):
# resource temp unavailable; eg, someone beat us to the lock.