Skip to content

Commit

Permalink
Fix circular import
Browse files Browse the repository at this point in the history
  • Loading branch information
albireox committed Sep 7, 2024
1 parent fa6c4c7 commit 6e9e2a5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/gort/pubsub.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@

from gort import config
from gort.enums import Event
from gort.exceptions import GortWarning


if TYPE_CHECKING:
Expand Down Expand Up @@ -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

Expand Down

0 comments on commit 6e9e2a5

Please sign in to comment.