mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
bpo-29762: More use "raise from None". (#569)
This hides unwanted implementation details from tracebacks.
This commit is contained in:
parent
43ba8861e0
commit
5affd23e6f
30 changed files with 50 additions and 48 deletions
|
@ -72,7 +72,7 @@ def distb(tb=None, *, file=None):
|
|||
try:
|
||||
tb = sys.last_traceback
|
||||
except AttributeError:
|
||||
raise RuntimeError("no last traceback to disassemble")
|
||||
raise RuntimeError("no last traceback to disassemble") from None
|
||||
while tb.tb_next: tb = tb.tb_next
|
||||
disassemble(tb.tb_frame.f_code, tb.tb_lasti, file=file)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue