Fix the formatting of KeyboardInterrupt -- a bad issubclass() call.

This commit is contained in:
Guido van Rossum 2006-05-02 17:36:09 +00:00
parent a883701dff
commit 8f6cbe1502
2 changed files with 7 additions and 1 deletions

View file

@ -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