mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Remove redundant isinstance() check.
This commit is contained in:
parent
7f59732716
commit
7c187bcc82
1 changed files with 1 additions and 1 deletions
|
@ -158,7 +158,7 @@ def format_exception_only(etype, value):
|
||||||
"""
|
"""
|
||||||
list = []
|
list = []
|
||||||
if (type(etype) == types.ClassType
|
if (type(etype) == types.ClassType
|
||||||
or (isinstance(etype, type) and issubclass(etype, Exception))):
|
or issubclass(etype, Exception)):
|
||||||
stype = etype.__name__
|
stype = etype.__name__
|
||||||
else:
|
else:
|
||||||
stype = etype
|
stype = etype
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue