diff options
author | Guido van Rossum <guido@python.org> | 1997-09-29 23:22:12 +0000 |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-09-29 23:22:12 +0000 |
commit | f15d15964b6ac3e5ff71894707fbcff48bec45b2 (patch) | |
tree | e0fccf5a3756b03f3f0b2a265c65a175ffe61f09 /Lib/types.py | |
parent | c90ad2103eb9aca14b7a910cbcdcd7b570f690ab (diff) | |
download | cpython-f15d15964b6ac3e5ff71894707fbcff48bec45b2.tar.gz cpython-f15d15964b6ac3e5ff71894707fbcff48bec45b2.zip |
Use sys.exc_info() where needed.
Diffstat (limited to 'Lib/types.py')
-rw-r--r-- | Lib/types.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/types.py b/Lib/types.py index 5254ebc97d6..aeac304d6d9 100644 --- a/Lib/types.py +++ b/Lib/types.py @@ -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) |