mirror of
https://github.com/python/cpython.git
synced 2025-11-25 04:34:37 +00:00
Fix the formatting of KeyboardInterrupt -- a bad issubclass() call.
This commit is contained in:
parent
a883701dff
commit
8f6cbe1502
2 changed files with 7 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 (isinstance(etype, type) and issubclass(etype, BaseException))):
|
||||
stype = etype.__name__
|
||||
else:
|
||||
stype = etype
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue