diff options
author | Guido van Rossum <guido@python.org> | 1997-09-29 23:22:12 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1997-09-29 23:22:12 (GMT) |
commit | f15d15964b6ac3e5ff71894707fbcff48bec45b2 (patch) | |
tree | e0fccf5a3756b03f3f0b2a265c65a175ffe61f09 /Lib/tb.py | |
parent | c90ad2103eb9aca14b7a910cbcdcd7b570f690ab (diff) | |
download | cpython-f15d15964b6ac3e5ff71894707fbcff48bec45b2.zip cpython-f15d15964b6ac3e5ff71894707fbcff48bec45b2.tar.gz cpython-f15d15964b6ac3e5ff71894707fbcff48bec45b2.tar.bz2 |
Use sys.exc_info() where needed.
Diffstat (limited to 'Lib/tb.py')
-rw-r--r-- | Lib/tb.py | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -74,13 +74,14 @@ def browserexec(tb, cmd): try: exec cmd+'\n' in globals, locals except: + t, v = sys.exc_info()[:2] print '*** Exception:', - if type(sys.exc_type) == type(''): - print sys.exc_type, + if type(t) == type(''): + print t, else: - print sys.exc_type.__name__, - if sys.exc_value <> None: - print ':', sys.exc_value, + print t.__name__, + if v <> None: + print ':', v, print print 'Type help to get help.' |