diff options
author | Zac Medico <zmedico@gentoo.org> | 2011-06-09 08:43:40 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2011-06-09 08:43:40 -0700 |
commit | 6c5f977d943745f1eaa47da89e32b6c8cd49f41c (patch) | |
tree | 904a4712d632bdc25fb457003badda46bfbaf351 | |
parent | dbc9f3cc4c665af6d5db24bd9fb7544ed711d96f (diff) | |
download | portage-6c5f977d943745f1eaa47da89e32b6c8cd49f41c.tar.gz portage-6c5f977d943745f1eaa47da89e32b6c8cd49f41c.tar.bz2 portage-6c5f977d943745f1eaa47da89e32b6c8cd49f41c.zip |
lockfile: use hasattr() instead of dir()
-rw-r--r-- | pym/portage/locks.py | 2 |
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. |