diff options
Diffstat (limited to 'redis/lock.py')
| -rw-r--r-- | redis/lock.py | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/redis/lock.py b/redis/lock.py index e36b2da..326dbaf 100644 --- a/redis/lock.py +++ b/redis/lock.py @@ -149,9 +149,7 @@ class Lock: client.register_script(cls.LUA_REACQUIRE_SCRIPT) def __enter__(self): - # force blocking, as otherwise the user would have to check whether - # the lock was actually acquired or not. - if self.acquire(blocking=True): + if self.acquire(): return self raise LockError("Unable to acquire lock within the time specified") |
