Commit 4a26633e authored by Phillip J. Eby's avatar Phillip J. Eby

Revert r42719, because the isinstance() check wasn't redundant; formatting a

string exception was causing a TypeError.
parent fd3fcf0b
...@@ -158,7 +158,7 @@ def format_exception_only(etype, value): ...@@ -158,7 +158,7 @@ def format_exception_only(etype, value):
""" """
list = [] list = []
if (type(etype) == types.ClassType if (type(etype) == types.ClassType
or issubclass(etype, Exception)): or (isinstance(etype, type) and issubclass(etype, Exception))):
stype = etype.__name__ stype = etype.__name__
else: else:
stype = etype stype = etype
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment