summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Brown <ben.brown@codethink.co.uk>2017-06-27 10:48:42 +0100
committerBen Brown <ben.brown@codethink.co.uk>2017-09-26 14:31:50 +0100
commit4069d2e386f6b5e9f13407502fefd32a3b9c45da (patch)
tree3f7a37796a2268cdda8cf557ce14085c14c80e87
parent4419d6600008cb04e9887afb9d01c91a45c9313e (diff)
downloadybd-4069d2e386f6b5e9f13407502fefd32a3b9c45da.tar.gz
flock throws IOErrors
-rw-r--r--ybd/assembly.py2
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)