Merge "ipc: Fix acquire lock loop logic"

This commit is contained in:
Jenkins 2014-10-06 09:40:52 +00:00 committed by Gerrit Code Review
commit a90940a506
1 changed files with 2 additions and 2 deletions

View File

@ -87,14 +87,14 @@ class IPCLock(locking.Lock):
except sysv_ipc.ExistentialError:
# Semaphore has been deleted in the mean time, retry from
# the beginning!
pass
continue
try:
self._lock.acquire(timeout=timeout)
except sysv_ipc.BusyError:
return False
except sysv_ipc.ExistentialError:
# Likely the lock has been deleted in the meantime, retry
pass
continue
else:
return True