From 4a26633e0e4ba756794e753cc0dec20535bb412a Mon Sep 17 00:00:00 2001 From: "Phillip J. Eby" Date: Fri, 24 Mar 2006 22:10:54 +0000 Subject: Revert r42719, because the isinstance() check wasn't redundant; formatting a string exception was causing a TypeError. --- Lib/traceback.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v0.12