diff options
author | Zac Medico <zmedico@gentoo.org> | 2010-09-18 04:12:34 -0700 |
---|---|---|
committer | Zac Medico <zmedico@gentoo.org> | 2010-09-18 04:12:34 -0700 |
commit | 056bcf353615186e755122b6bf2f0ffe98a9c6c7 (patch) | |
tree | 59fc2509d49d6d15a5d04a2a95702b3ec636d1ff | |
parent | c86d7614083539325184dd70828cdbad39525d8c (diff) | |
download | portage-056bcf353615186e755122b6bf2f0ffe98a9c6c7.tar.gz portage-056bcf353615186e755122b6bf2f0ffe98a9c6c7.tar.bz2 portage-056bcf353615186e755122b6bf2f0ffe98a9c6c7.zip |
Fix lockfile() to close the file descriptor before raising TryAgain.
-rw-r--r-- | pym/portage/locks.py | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/pym/portage/locks.py b/pym/portage/locks.py index 00a50b818..1f8f58013 100644 --- a/pym/portage/locks.py +++ b/pym/portage/locks.py @@ -118,6 +118,7 @@ def lockfile(mypath, wantnewlockfile=0, unlinkfile=0, if e.errno in (errno.EACCES, errno.EAGAIN): # resource temp unavailable; eg, someone beat us to the lock. if flags & os.O_NONBLOCK: + os.close(myfd) raise TryAgain(mypath) global _quiet |