From: Neal Norwitz Date: Mon, 26 Feb 2007 23:48:27 +0000 (+0000) Subject: SF #1669182, 2.5 was already fixed. Just assert in 2.6 since string exceptions X-Git-Tag: v2.6a1~2135 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f83b751f4b60901248e9916de6e544720bb22ab1;p=python 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 9a23c05282..3b8ea64f67 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -590,8 +590,9 @@ PyErr_WriteUnraisable(PyObject *obj) 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)