diff options
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r-- | Modules/posixmodule.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 05afe9e..540ee9d 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -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; |