diff options
Diffstat (limited to 'Lib/traceback.py')
-rw-r--r-- | Lib/traceback.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/traceback.py b/Lib/traceback.py index 95cde2b..d4a4011 100644 --- a/Lib/traceback.py +++ b/Lib/traceback.py @@ -157,7 +157,8 @@ def format_exception_only(etype, value): which exception occurred is the always last string in the list. """ list = [] - if type(etype) == types.ClassType: + if (type(etype) == types.ClassType + or (isinstance(etype, type) and issubclass(etype, Exception))): stype = etype.__name__ else: stype = etype |