bpo-38530: Make sure that failing to generate suggestions on failure will not propagate exceptions (GH-25408)
This commit is contained in:
@@ -962,6 +962,8 @@ print_exception(PyObject *f, PyObject *value)
|
||||
err += PyFile_WriteString("?", f);
|
||||
}
|
||||
Py_DECREF(suggestions);
|
||||
} else if (PyErr_Occurred()) {
|
||||
PyErr_Clear();
|
||||
}
|
||||
err += PyFile_WriteString("\n", f);
|
||||
Py_XDECREF(tb);
|
||||
|
||||
Reference in New Issue
Block a user