Skip to content

Commit d904f38

Browse files
committed
Fix
1 parent 54cda52 commit d904f38

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

sentry_sdk/integrations/flask.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ def _request_started(app, **kwargs):
156156

157157

158158
def _request_finished(sender, response, **kwargs):
159-
# Manually close the transaction because Bottle does not call `close()` on the WSGI response
159+
# Manually close the transaction because Flask does not call `close()` on the WSGI response
160160
finish_running_transaction()
161161

162162

sentry_sdk/tracing_utils.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,5 +729,7 @@ def get_current_span(scope=None):
729729
def finish_running_transaction():
730730
# type: () -> None
731731
current_scope = sentry_sdk.get_current_scope()
732-
if current_scope._transaction is not None and hasattr(current_scope._transaction, "_context_manager_state"):
733-
current_scope._transaction.__exit__(None, None, None)
732+
if current_scope.transaction is not None and hasattr(
733+
current_scope.transaction, "_context_manager_state"
734+
):
735+
current_scope.transaction.__exit__(None, None, None)

0 commit comments

Comments
 (0)