]> granicus.if.org Git - python/commitdiff
remove more code for restricted execution
authorBenjamin Peterson <benjamin@python.org>
Fri, 28 Aug 2009 16:49:56 +0000 (16:49 +0000)
committerBenjamin Peterson <benjamin@python.org>
Fri, 28 Aug 2009 16:49:56 +0000 (16:49 +0000)
Lib/types.py

index 39ad4889812240b6234a59b65c0c8e65e5b43d0b..ff90e049730d637e12d01269acfedf7182e32b44 100644 (file)
@@ -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)