mirror of
https://github.com/python/cpython.git
synced 2025-10-15 03:10:29 +00:00
gh-129354: Use PyErr_FormatUnraisable() function (#129656)
Replace PyErr_WriteUnraisable() with PyErr_FormatUnraisable().
This commit is contained in:
parent
979d766209
commit
14489c1bb4
3 changed files with 8 additions and 4 deletions
|
@ -5359,7 +5359,8 @@ sock_finalize(PyObject *self)
|
|||
if (PyErr_ResourceWarning((PyObject *)s, 1, "unclosed %R", s)) {
|
||||
/* Spurious errors can appear at shutdown */
|
||||
if (PyErr_ExceptionMatches(PyExc_Warning)) {
|
||||
PyErr_WriteUnraisable((PyObject *)s);
|
||||
PyErr_FormatUnraisable("Exception ignored while "
|
||||
"finalizing socket %R", s);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue