We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1a41cfd commit c7e26aeCopy full SHA for c7e26ae
redis/lock.py
@@ -149,9 +149,7 @@ def register_scripts(self):
149
client.register_script(cls.LUA_REACQUIRE_SCRIPT)
150
151
def __enter__(self):
152
- # force blocking, as otherwise the user would have to check whether
153
- # the lock was actually acquired or not.
154
- if self.acquire(blocking=True):
+ if self.acquire():
155
return self
156
raise LockError("Unable to acquire lock within the time specified")
157
0 commit comments