Mercurial > cpython-lru_cache-weakref
diff Python/errors.c @ 40956:c83acfb1a632 legacy-trunk
SF #1669182, 2.5 was already fixed. Just assert in 2.6 since string exceptions
are gone.
| author | Neal Norwitz <nnorwitz@gmail.com> |
|---|---|
| date | Mon, 26 Feb 2007 23:48:27 +0000 |
| parents | f3f0c697aa5b |
| children | 3bc3f12cae28 |
line wrap: on
line diff
--- a/Python/errors.c Mon Feb 26 23:02:47 2007 +0000 +++ b/Python/errors.c Mon Feb 26 23:48:27 2007 +0000 @@ -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)
