mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
bpo-33330: Write exceptions occurred in PyImport_Cleanup() to stderr. (GH-6606)
They where silenced before.
This commit is contained in:
parent
55edd0c185
commit
c1a6832f50
2 changed files with 26 additions and 20 deletions
|
@ -603,8 +603,9 @@ _PyModule_ClearDict(PyObject *d)
|
|||
else
|
||||
PyErr_Clear();
|
||||
}
|
||||
if (PyDict_SetItem(d, key, Py_None) != 0)
|
||||
PyErr_Clear();
|
||||
if (PyDict_SetItem(d, key, Py_None) != 0) {
|
||||
PyErr_WriteUnraisable(NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -623,8 +624,9 @@ _PyModule_ClearDict(PyObject *d)
|
|||
else
|
||||
PyErr_Clear();
|
||||
}
|
||||
if (PyDict_SetItem(d, key, Py_None) != 0)
|
||||
PyErr_Clear();
|
||||
if (PyDict_SetItem(d, key, Py_None) != 0) {
|
||||
PyErr_WriteUnraisable(NULL);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue