diff --git a/Lib/traceback.py b/Lib/traceback.py index 497190656f8..d4a40114ea1 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