commit | c7acf2a106caacc11397e35afe054816fd6181fa | [log] [tgz] |
---|---|---|
author | Guido van Rossum <guido@python.org> | Mon Feb 27 13:15:45 1995 +0000 |
committer | Guido van Rossum <guido@python.org> | Mon Feb 27 13:15:45 1995 +0000 |
tree | 3eb0a826eabd8d7968198399eb28b5efb9902286 | |
parent | cebfa70a794ba3d4aeda681b3164123d934d1c28 [diff] [blame] |
handle class exceptions
diff --git a/Lib/tb.py b/Lib/tb.py index 6b9cd9a..0442ba8 100644 --- a/Lib/tb.py +++ b/Lib/tb.py
@@ -74,7 +74,10 @@ exec(cmd+'\n', globals, locals) except: print '*** Exception:', - print sys.exc_type, + if type(sys.exc_type) == type(''): + print sys.exc_type, + else: + print sys.exc_type.__name__, if sys.exc_value <> None: print ':', sys.exc_value, print