summaryrefslogtreecommitdiff
path: root/src/leap/platform_init/locks.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/leap/platform_init/locks.py')
-rw-r--r--src/leap/platform_init/locks.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/leap/platform_init/locks.py b/src/leap/platform_init/locks.py
index 2cdee3d9..f1672d8e 100644
--- a/src/leap/platform_init/locks.py
+++ b/src/leap/platform_init/locks.py
@@ -19,6 +19,7 @@ Utilities for handling multi-platform file locking mechanisms
"""
import commands
import logging
+import errno
import os
import platform
@@ -81,7 +82,10 @@ if platform_init.IS_UNIX:
flock(self._fd, LOCK_EX | LOCK_NB)
except IOError as exc:
# could not get the lock
- if exc.args[0] == 11:
+ #import ipdb; ipdb.set_trace()
+
+ if exc.args[0] in (errno.EDEADLK, errno.EAGAIN):
+ # errno 11 or 35
# Resource temporarily unavailable
return False
else: