mirror of
https://github.com/python/cpython.git
synced 2025-07-18 16:55:20 +00:00
bpo-38530: Make sure that failing to generate suggestions on failure will not propagate exceptions (GH-25408)
This commit is contained in:
parent
0c4c436325
commit
e07f4ab26a
3 changed files with 19 additions and 7 deletions
|
@ -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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue