8000 fix: Make the main hub the current hub for main thread (#119) · etherscan-io/sentry-python@69c084f · GitHub
[go: up one dir, main page]

Skip to content

Commit 69c084f

Browse files
authored
fix: Make the main hub the current hub for main thread (getsentry#119)
1 parent df92dda commit 69c084f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

sentry_sdk/hub.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ def init(*args, **kwargs):
4747
"""
4848
global _initial_client
4949
client = Client(*args, **kwargs)
50-
Hub.main.bind_client(client)
50+
Hub.current.bind_client(client)
5151
rv = _InitGuard(client)
5252
if client is not None:
5353
_initial_client = weakref.ref(client)
@@ -317,3 +317,4 @@ def scope(self, callback=None):
317317

318318

319319
GLOBAL_HUB = Hub()
320+
_local.set(GLOBAL_HUB)

0 commit comments

Comments
 (0)
0