From: Phillip J. Eby Date: Fri, 24 Mar 2006 22:10:54 +0000 (+0000) Subject: Revert r42719, because the isinstance() check wasn't redundant; formatting a X-Git-Tag: v2.5a0~109 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=4a26633e0e4ba756794e753cc0dec20535bb412a;p=thirdparty%2FPython%2Fcpython.git Revert r42719, because the isinstance() check wasn't redundant; formatting a string exception was causing a TypeError. --- diff --git a/Lib/traceback.py b/Lib/traceback.py index 497190656f8f..d4a40114ea19 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