summaryrefslogtreecommitdiffstats
path: root/Lib/tb.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/tb.py')
-rw-r--r--Lib/tb.py5
1 files changed, 4 insertions, 1 deletions
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 @@ def browserexec(tb, cmd):
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