mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
bpo-35459: Use PyDict_GetItemWithError() instead of PyDict_GetItem(). (GH-11112)
This commit is contained in:
parent
a180b007d9
commit
a24107b04c
31 changed files with 538 additions and 242 deletions
|
@ -9837,6 +9837,9 @@ os_unsetenv_impl(PyObject *module, PyObject *name)
|
|||
*/
|
||||
if (PyDict_DelItem(posix_putenv_garbage, name)) {
|
||||
/* really not much we can do; just leak */
|
||||
if (!PyErr_ExceptionMatches(PyExc_KeyError)) {
|
||||
return NULL;
|
||||
}
|
||||
PyErr_Clear();
|
||||
}
|
||||
Py_RETURN_NONE;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue