According to the man pages on Gentoo Linux and Tru64, EACCES or EAGAIN

can be returned if fcntl (lockf) fails.  This fixes the test failure
on Tru64 by checking for either error rather than just EAGAIN.
This commit is contained in:
Neal Norwitz 2006-06-28 05:03:22 +00:00
parent 0350f81abe
commit 7983c7298d
1 changed files with 1 additions and 1 deletions

View File

@ -1805,7 +1805,7 @@ def _lock_file(f, dotlock=True):
try:
fcntl.lockf(f, fcntl.LOCK_EX | fcntl.LOCK_NB)
except IOError, e:
if e.errno == errno.EAGAIN:
if e.errno in (errno.EAGAIN, errno.EACCES):
raise ExternalClashError('lockf: lock unavailable: %s' %
f.name)
else: