summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPhillip J. Eby <pje@telecommunity.com>2006-03-24 22:10:54 (GMT)
committerPhillip J. Eby <pje@telecommunity.com>2006-03-24 22:10:54 (GMT)
commit4a26633e0e4ba756794e753cc0dec20535bb412a (patch)
tree8b36f3a89bcb23e1660d923a8d6bb08b1f6f892b
parentfd3fcf0b35a479c3df4999d9bad2337a5e3af140 (diff)
downloadcpython-4a26633e0e4ba756794e753cc0dec20535bb412a.zip
cpython-4a26633e0e4ba756794e753cc0dec20535bb412a.tar.gz
cpython-4a26633e0e4ba756794e753cc0dec20535bb412a.tar.bz2
Revert r42719, because the isinstance() check wasn't redundant; formatting a
string exception was causing a TypeError.
-rw-r--r--Lib/traceback.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/traceback.py b/Lib/traceback.py
index 4971906..d4a4011 100644
--- a/Lib/traceback.py
+++ b/Lib/traceback.py
@@ -158,7 +158,7 @@ def format_exception_only(etype, value):
"""
list = []
if (type(etype) == types.ClassType
- or issubclass(etype, Exception)):
+ or (isinstance(etype, type) and issubclass(etype, Exception))):
stype = etype.__name__
else:
stype = etype