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