Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' into gh-82378-fix-tracebacklimit-in-pyrepl
  • Loading branch information
cfbolz committed Jul 31, 2024
commit 01cb96a25a5aeaa6dc02525453b84499b7843570
6 changes: 3 additions & 3 deletions Lib/code.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,10 +147,10 @@ def showtraceback(self, **kwargs):
sys.last_traceback = last_tb
sys.last_exc = ei[1]
try:
lines = traceback.format_exception(ei[0], ei[1], last_tb.tb_next, colorize=colorize,
limit=limit)
if sys.excepthook is sys.__excepthook__:
lines = traceback.format_exception(ei[0], ei[1], last_tb.tb_next, colorize=colorize)
lines = traceback.format_exception(
ei[0], ei[1], last_tb.tb_next, colorize=colorize,
limit=limit)
self.write(''.join(lines))
else:
# If someone has set sys.excepthook, we let that take precedence
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.