mirror of
https://github.com/python/cpython.git
synced 2025-07-13 22:35:18 +00:00
bpo-43660: Fix crash when displaying exceptions with custom values for sys.stderr (GH-25075) (GH-25083)
(cherry picked from commit 09b90a037d
)
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
This commit is contained in:
parent
acb584958e
commit
ff4715a733
3 changed files with 20 additions and 1 deletions
|
@ -1072,8 +1072,9 @@ PyErr_Display(PyObject *exception, PyObject *value, PyObject *tb)
|
|||
if (file == Py_None) {
|
||||
return;
|
||||
}
|
||||
|
||||
Py_INCREF(file);
|
||||
_PyErr_Display(file, exception, value, tb);
|
||||
Py_DECREF(file);
|
||||
}
|
||||
|
||||
PyObject *
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue