8000 gh-82378 fix sys.tracebacklimit in pyrepl by cfbolz · Pull Request #123062 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-82378 fix sys.tracebacklimit in pyrepl #123062

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.
0