redis: log an error on release failure

Change-Id: Id63beaea3a0bc972a7117526aee1ad3f1ac99d84
This commit is contained in:
Julien Danjou 2017-08-14 10:17:20 +02:00
parent 1b321bcfc1
commit a25815d9a8
1 changed files with 2 additions and 1 deletions

View File

@ -99,7 +99,8 @@ class RedisLock(locking.Lock):
with _translate_failures():
try:
self._lock.release()
except exceptions.LockError:
except exceptions.LockError as e:
LOG.error("Unable to release lock '%r': %s", self, e)
return False
self._coord._acquired_locks.discard(self)
return True