From 3b02848e689e9cea0ba8fd44610f6970413d5b5a Mon Sep 17 00:00:00 2001 From: Jakub Kuczys Date: Wed, 16 Sep 2026 18:53:19 +0200 Subject: [PATCH] Fix deprecated use of sentry_sdk.Hub Fixes #52 --- sentryio/core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sentryio/core.py b/sentryio/core.py index 26f082a..43edff6 100644 --- a/sentryio/core.py +++ b/sentryio/core.py @@ -59,7 +59,7 @@ def init_sentry(self, dsn: str) -> None: ) def close_sentry(self) -> None: - client = sentry_sdk.Hub.current.client + client = sentry_sdk.get_client() if client is not None: log.info("Closing Sentry client") client.close(timeout=0) @@ -75,7 +75,7 @@ async def sentry_group(self, ctx): @sentry_group.command(name="status") async def status(self, ctx): """Check the status of Sentry.IO integration.""" - client = sentry_sdk.Hub.current.client + client = sentry_sdk.get_client() if client is None: await ctx.send("Sentry.IO is not initialized.") return