From 42d468c895dfc6db887daa53b2d1c0d9d568559d Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Fri, 31 Mar 2023 22:31:32 +0200 Subject: [PATCH] `get_lock` should raise a TimeoutError if `lock.acquire` is False --- platypush/utils/__init__.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platypush/utils/__init__.py b/platypush/utils/__init__.py index 2376b21d35..fb68bc98b3 100644 --- a/platypush/utils/__init__.py +++ b/platypush/utils/__init__.py @@ -579,6 +579,8 @@ def get_lock( result = lock.acquire(**kwargs) try: + if not result: + raise TimeoutError() yield result finally: if result: