mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +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 = []
|
||||
if (type(etype) == types.ClassType
|
||||
or (isinstance(etype, type) and issubclass(etype, Exception))):
|
||||
or issubclass(etype, Exception)):
|
||||
stype = etype.__name__
|
||||
else:
|
||||
stype = etype
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue