We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 16a9e6a commit 91b05edCopy full SHA for 91b05ed
sentry_sdk/hub.py
@@ -47,7 +47,7 @@ def __enter__(self):
47
return self
48
49
def __exit__(self, exc_type, exc_value, tb):
50
- assert self._hub._stack.pop() == self._layer, "popped wrong scope"
+ assert self._hub.pop_scope_unsafe() == self._layer, "popped wrong scope"
51
52
53
class Hub(with_metaclass(HubMeta)):
@@ -175,7 +175,7 @@ def pop_scope_unsafe(self):
175
"""Pops a scope layer from the stack. Try to use the context manager
176
`push_scope()` instead."""
177
self._pending_processors = []
178
- self._stack.pop()
+ return self._stack.pop()
179
180
@contextmanager
181
def configure_scope(self):
0 commit comments