]> granicus.if.org Git - python/commitdiff
Revert r42719, because the isinstance() check wasn't redundant; formatting a
authorPhillip J. Eby <pje@telecommunity.com>
Fri, 24 Mar 2006 22:10:54 +0000 (22:10 +0000)
committerPhillip J. Eby <pje@telecommunity.com>
Fri, 24 Mar 2006 22:10:54 +0000 (22:10 +0000)
string exception was causing a TypeError.

Lib/traceback.py

index 497190656f8f12549e66d5c7d940e457d3b5da6a..d4a40114ea199eca544fc8680d61d26dd110660a 100644 (file)
@@ -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