mirror of
https://github.com/python/cpython.git
synced 2025-08-27 12:16:04 +00:00
Use sys.exc_info() where needed.
This commit is contained in:
parent
c90ad2103e
commit
f15d15964b
9 changed files with 38 additions and 32 deletions
|
@ -51,10 +51,12 @@ try:
|
|||
raise TypeError
|
||||
except TypeError:
|
||||
try:
|
||||
TracebackType = type(sys.exc_traceback)
|
||||
FrameType = type(sys.exc_traceback.tb_frame)
|
||||
tb = sys.exc_info()[2]
|
||||
TracebackType = type(tb)
|
||||
FrameType = type(tb.tb_frame)
|
||||
except:
|
||||
pass
|
||||
tb = None; del tb
|
||||
|
||||
SliceType = type(slice(0))
|
||||
EllipsisType = type(Ellipsis)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue