From 7983c7298d2c1254bc17a5a1ab696bdf0360b63d Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Wed, 28 Jun 2006 05:03:22 +0000 Subject: [PATCH] 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. --- Lib/mailbox.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/mailbox.py b/Lib/mailbox.py index 02fbb854c60..d054628c7a8 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: