get_lock should raise a TimeoutError if lock.acquire is False

This commit is contained in:
Fabio Manganiello 2023-03-31 22:31:32 +02:00
parent 9693becb9e
commit 42d468c895
Signed by: blacklight
GPG key ID: D90FBA7F76362774

View file

@ -579,6 +579,8 @@ def get_lock(
result = lock.acquire(**kwargs)
try:
if not result:
raise TimeoutError()
yield result
finally:
if result: