From f83b751f4b60901248e9916de6e544720bb22ab1 Mon Sep 17 00:00:00 2001 From: Neal Norwitz Date: Mon, 26 Feb 2007 23:48:27 +0000 Subject: SF #1669182, 2.5 was already fixed. Just assert in 2.6 since string exceptions are gone. --- Python/errors.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'Python/errors.c') diff --git a/Python/errors.c b/Python/errors.c index 9a23c052828..3b8ea64f673 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) -- cgit v1.2.3