Skip to content

Commit f83b751

Browse files
committed
SF #1669182, 2.5 was already fixed. Just assert in 2.6 since string exceptions
are gone.
1 parent f2ae27e commit f83b751

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Python/errors.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,8 +590,9 @@ PyErr_WriteUnraisable(PyObject *obj)
590590
PyFile_WriteString("Exception ", f);
591591
if (t) {
592592
PyObject* moduleName;
593-
char* className = PyExceptionClass_Name(t);
594-
593+
char* className;
594+
assert(PyExceptionClass_Check(t));
595+
className = PyExceptionClass_Name(t);
595596
if (className != NULL) {
596597
char *dot = strrchr(className, '.');
597598
if (dot != NULL)

0 commit comments

Comments
 (0)