diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2006-06-28 05:03:22 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2006-06-28 05:03:22 (GMT) |
commit | 7983c7298d2c1254bc17a5a1ab696bdf0360b63d (patch) | |
tree | 6307ab59927603b0a7ec4757a49ad61cad15281f /Lib/mailbox.py | |
parent | 0350f81abeab76652790d24a6f65af25b36c18f7 (diff) | |
download | cpython-7983c7298d2c1254bc17a5a1ab696bdf0360b63d.zip cpython-7983c7298d2c1254bc17a5a1ab696bdf0360b63d.tar.gz cpython-7983c7298d2c1254bc17a5a1ab696bdf0360b63d.tar.bz2 |
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.
Diffstat (limited to 'Lib/mailbox.py')
-rwxr-xr-x | Lib/mailbox.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/mailbox.py b/Lib/mailbox.py index 02fbb85..d054628 100755 --- a/Lib/mailbox.py +++ b/Lib/mailbox.py @@ -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: |