diff options
author | Phillip J. Eby <pje@telecommunity.com> | 2006-03-24 22:10:54 (GMT) |
---|---|---|
committer | Phillip J. Eby <pje@telecommunity.com> | 2006-03-24 22:10:54 (GMT) |
commit | 4a26633e0e4ba756794e753cc0dec20535bb412a (patch) | |
tree | 8b36f3a89bcb23e1660d923a8d6bb08b1f6f892b /Lib/traceback.py | |
parent | fd3fcf0b35a479c3df4999d9bad2337a5e3af140 (diff) | |
download | cpython-4a26633e0e4ba756794e753cc0dec20535bb412a.zip cpython-4a26633e0e4ba756794e753cc0dec20535bb412a.tar.gz cpython-4a26633e0e4ba756794e753cc0dec20535bb412a.tar.bz2 |
Revert r42719, because the isinstance() check wasn't redundant; formatting a
string exception was causing a TypeError.
Diffstat (limited to 'Lib/traceback.py')
-rw-r--r-- | Lib/traceback.py | 2 |
1 files changed, 1 insertions, 1 deletions
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 |