From adfedfa2ddb67fea68cbcfd4c5c15fd8f83ce557 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Thu, 17 Aug 2023 02:36:40 +0200 Subject: [PATCH] s/TimeoutError/AssertionError/ if get_entities_engine times out. --- platypush/entities/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/platypush/entities/__init__.py b/platypush/entities/__init__.py index 4f5d46f782..5548987486 100644 --- a/platypush/entities/__init__.py +++ b/platypush/entities/__init__.py @@ -52,7 +52,8 @@ def get_entities_engine(timeout: Optional[float] = None) -> EntitiesEngine: Event().wait(1) - assert _engine, 'The entities engine has not been initialized' + if not _engine: + raise TimeoutError('The entities engine has not been initialized') return _engine