summaryrefslogtreecommitdiff
path: root/src/leap
diff options
context:
space:
mode:
authorTomas Touceda <chiiph@leap.se>2013-04-16 11:00:10 -0300
committerTomas Touceda <chiiph@leap.se>2013-04-16 11:00:10 -0300
commit19e5675fdcaa454a6519f8d66f839025674b4fcc (patch)
treea9c17c9d71e89aeca88289a4f890b0846f38aeb8 /src/leap
parent922505a562474b9951bde02f93abbea0a4df5f10 (diff)
parentff02409fdd40adc1611a11e0be3c1dcf9e36af3e (diff)
Merge remote-tracking branch 'kali/bug/fix-flock-errno-osx' into develop
Diffstat (limited to 'src/leap')
-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: