PEP 352 implementation.  Creates a new base class, BaseException, which has an
added message attribute compared to the previous version of Exception.  It is
also a new-style class, making all exceptions now new-style.  KeyboardInterrupt
and SystemExit inherit from BaseException directly.  String exceptions now
raise DeprecationWarning.

Applies patch 1104669, and closes bugs 1012952 and 518846.
diff --git a/Lib/traceback.py b/Lib/traceback.py
index 95cde2b..d4a4011 100644
--- a/Lib/traceback.py
+++ b/Lib/traceback.py
@@ -157,7 +157,8 @@
     which exception occurred is the always last string in the list.
     """
     list = []
-    if type(etype) == types.ClassType:
+    if (type(etype) == types.ClassType
+        or (isinstance(etype, type) and issubclass(etype, Exception))):
         stype = etype.__name__
     else:
         stype = etype