summaryrefslogtreecommitdiffstats
path: root/pym/portage/locks.py
diff options
context:
space:
mode:
Diffstat (limited to 'pym/portage/locks.py')
-rw-r--r--pym/portage/locks.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/pym/portage/locks.py b/pym/portage/locks.py
index 50a920061..9ed1d6a6c 100644
--- 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.