mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
SF #1669182, 2.5 was already fixed. Just assert in 2.6 since string exceptions
are gone.
This commit is contained in:
parent
f2ae27e61a
commit
f83b751f4b
1 changed files with 3 additions and 2 deletions
|
@ -590,8 +590,9 @@ PyErr_WriteUnraisable(PyObject *obj)
|
||||||
PyFile_WriteString("Exception ", f);
|
PyFile_WriteString("Exception ", f);
|
||||||
if (t) {
|
if (t) {
|
||||||
PyObject* moduleName;
|
PyObject* moduleName;
|
||||||
char* className = PyExceptionClass_Name(t);
|
char* className;
|
||||||
|
assert(PyExceptionClass_Check(t));
|
||||||
|
className = PyExceptionClass_Name(t);
|
||||||
if (className != NULL) {
|
if (className != NULL) {
|
||||||
char *dot = strrchr(className, '.');
|
char *dot = strrchr(className, '.');
|
||||||
if (dot != NULL)
|
if (dot != NULL)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue