Skip to content

Commit 06dbeae

Browse files
committed
feat: Disable excepthook in interactive REPL
1 parent 76e6085 commit 06dbeae

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

sentry_sdk/integrations/excepthook.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ def __init__(self):
1313
pass
1414

1515
def install(self, client):
16+
if hasattr(sys, 'ps1'):
17+
# Disable the excepthook for interactive Python shells, otherwise
18+
# every typo gets sent to Sentry.
19+
return
20+
1621
sys.excepthook = _make_excepthook(sys.excepthook)
1722

1823

0 commit comments

Comments
 (0)