mirror of https://github.com/python/cpython
remove more code for restricted execution
This commit is contained in:
parent
f6348f4589
commit
cc54622651
13
Lib/types.py
13
Lib/types.py
|
@ -66,15 +66,10 @@ XRangeType = xrange
|
|||
try:
|
||||
raise TypeError
|
||||
except TypeError:
|
||||
try:
|
||||
tb = sys.exc_info()[2]
|
||||
TracebackType = type(tb)
|
||||
FrameType = type(tb.tb_frame)
|
||||
except AttributeError:
|
||||
# In the restricted environment, exc_info returns (None, None,
|
||||
# None) Then, tb.tb_frame gives an attribute error
|
||||
pass
|
||||
tb = None; del tb
|
||||
tb = sys.exc_info()[2]
|
||||
TracebackType = type(tb)
|
||||
FrameType = type(tb.tb_frame)
|
||||
del tb
|
||||
|
||||
SliceType = slice
|
||||
EllipsisType = type(Ellipsis)
|
||||
|
|
Loading…
Reference in New Issue