diff options
author | Ben Brown <ben.brown@codethink.co.uk> | 2017-06-27 10:48:42 +0100 |
---|---|---|
committer | Ben Brown <ben.brown@codethink.co.uk> | 2017-09-26 14:31:50 +0100 |
commit | 4069d2e386f6b5e9f13407502fefd32a3b9c45da (patch) | |
tree | 3f7a37796a2268cdda8cf557ce14085c14c80e87 | |
parent | 4419d6600008cb04e9887afb9d01c91a45c9313e (diff) | |
download | ybd-4069d2e386f6b5e9f13407502fefd32a3b9c45da.tar.gz |
flock throws IOErrors
-rw-r--r-- | ybd/assembly.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/ybd/assembly.py b/ybd/assembly.py index 9699d6e..3276138 100644 --- a/ybd/assembly.py +++ b/ybd/assembly.py @@ -212,7 +212,7 @@ def claim(dn): with open(lockfile(dn), 'a') as L: try: fcntl.flock(L, fcntl.LOCK_EX | fcntl.LOCK_NB) - except Exception as e: + except IOError as e: if e.errno in (errno.EACCES, errno.EAGAIN): # flock() will report EACCESS or EAGAIN when the lock fails. raise RetryException(dn) |