diff --git a/src/gort/pubsub.py b/src/gort/pubsub.py index 49857b7..3b2dafa 100644 --- a/src/gort/pubsub.py +++ b/src/gort/pubsub.py @@ -33,7 +33,6 @@ from gort import config from gort.enums import Event -from gort.exceptions import GortWarning if TYPE_CHECKING: @@ -216,6 +215,8 @@ async def publish(self, message: dict, routing_key: str | None = None): except AMQPConnectionError: await self.connect() except Exception as err: + from gort.exceptions import GortWarning + warnings.warn(f"Unexpected error in GortPublisher: {err}", GortWarning) break