summaryrefslogtreecommitdiffstats
path: root/Lib/types.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-08-28 16:49:56 (GMT)
committerBenjamin Peterson <benjamin@python.org>2009-08-28 16:49:56 (GMT)
commitcc54622651fe95c0bcb163262885a41cfdbbc615 (patch)
tree98f5d786c96051d145e2bef3835f06bbee3eafc9 /Lib/types.py
parentf6348f45899090f63e534d6772c98c67693bb774 (diff)
downloadcpython-cc54622651fe95c0bcb163262885a41cfdbbc615.zip
cpython-cc54622651fe95c0bcb163262885a41cfdbbc615.tar.gz
cpython-cc54622651fe95c0bcb163262885a41cfdbbc615.tar.bz2
remove more code for restricted execution
Diffstat (limited to 'Lib/types.py')
-rw-r--r--Lib/types.py13
1 files changed, 4 insertions, 9 deletions
diff --git a/Lib/types.py b/Lib/types.py
index 39ad488..ff90e04 100644
--- a/Lib/types.py
+++ b/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)