Remove redundant isinstance() check.
authorThomas Wouters <thomas@python.org>
Wed, 1 Mar 2006 05:34:22 +0000 (05:34 +0000)
committerThomas Wouters <thomas@python.org>
Wed, 1 Mar 2006 05:34:22 +0000 (05:34 +0000)
Lib/traceback.py

index d4a40114ea199eca544fc8680d61d26dd110660a..497190656f8f12549e66d5c7d940e457d3b5da6a 100644 (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 issubclass(etype, Exception)):
         stype = etype.__name__
     else:
         stype = etype