Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update Modules/_testcapi/exceptions.c
Co-authored-by: Victor Stinner <vstinner@python.org>
  • Loading branch information
serhiy-storchaka and vstinner authored Oct 30, 2023
commit 900b74bff24b7ed33d44670f5f7e3efcb8ab5daf
3 changes: 1 addition & 2 deletions Modules/_testcapi/exceptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,8 +313,7 @@ err_writeunraisable(PyObject *Py_UNUSED(module), PyObject *args)
NULLABLE(exc);
NULLABLE(obj);
if (exc) {
Py_INCREF(exc);
PyErr_SetRaisedException(exc);
PyErr_SetRaisedException(Py_NewRef(exc));
}
PyErr_WriteUnraisable(obj);
Py_RETURN_NONE;
Expand Down