mirror of
https://github.com/python/cpython.git
synced 2025-08-31 05:58:33 +00:00
bpo-43146: fix regression in traceback.print_exception(None) (GH-24463)
This commit is contained in:
parent
7bb1cafa4e
commit
26f18b8540
3 changed files with 22 additions and 1 deletions
|
@ -528,7 +528,9 @@ class TracebackException:
|
|||
cause = None
|
||||
|
||||
if compact:
|
||||
need_context = cause is None and not e.__suppress_context__
|
||||
need_context = (cause is None and
|
||||
e is not None and
|
||||
not e.__suppress_context__)
|
||||
else:
|
||||
need_context = True
|
||||
if (e and e.__context__ is not None
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue