SF #1669182, 2.5 was already fixed.  Just assert in 2.6 since string exceptions
are gone.
diff --git a/Python/errors.c b/Python/errors.c
index 9a23c05..3b8ea64 100644
--- a/Python/errors.c
+++ b/Python/errors.c
@@ -590,8 +590,9 @@
 		PyFile_WriteString("Exception ", f);
 		if (t) {
 			PyObject* moduleName;
-			char* className = PyExceptionClass_Name(t);
-
+			char* className;
+			assert(PyExceptionClass_Check(t));
+			className = PyExceptionClass_Name(t);
 			if (className != NULL) {
 				char *dot = strrchr(className, '.');
 				if (dot != NULL)