Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7c187bc

Browse files
committed
Remove redundant isinstance() check.
1 parent 7f59732 commit 7c187bc

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/traceback.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,7 @@ def format_exception_only(etype, value):
158158
"""
159159
list = []
160160
if (type(etype) == types.ClassType
161-
or (isinstance(etype, type) and issubclass(etype, Exception))):
161+
or issubclass(etype, Exception)):
162162
stype = etype.__name__
163163
else:
164164
stype = etype

0 commit comments

Comments
 (0)