diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2007-02-26 23:48:27 (GMT) |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2007-02-26 23:48:27 (GMT) |
commit | f83b751f4b60901248e9916de6e544720bb22ab1 (patch) | |
tree | 1d4c26ee41cd36bd5cd0a3459e6fd06cbeae8e13 /Python | |
parent | f2ae27e61a0df8f3bcee39b643abf83bf45b6417 (diff) | |
download | cpython-f83b751f4b60901248e9916de6e544720bb22ab1.zip cpython-f83b751f4b60901248e9916de6e544720bb22ab1.tar.gz cpython-f83b751f4b60901248e9916de6e544720bb22ab1.tar.bz2 |
SF #1669182, 2.5 was already fixed. Just assert in 2.6 since string exceptions
are gone.
Diffstat (limited to 'Python')
-rw-r--r-- | Python/errors.c | 5 |
1 files changed, 3 insertions, 2 deletions
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 @@ 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) |