diff options
Diffstat (limited to 'Python/errors.c')
-rw-r--r-- | Python/errors.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Python/errors.c b/Python/errors.c index e00d3ec..443235a 100644 --- a/Python/errors.c +++ b/Python/errors.c @@ -599,8 +599,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) @@ -825,4 +826,3 @@ PyErr_ProgramText(const char *filename, int lineno) #ifdef __cplusplus } #endif - |