mirror of https://github.com/python/cpython
Issue #19437: Fix parse_envlist() of the posix/nt module, don't call
PyMapping_Values() with an exception set, exit immediatly on error.
This commit is contained in:
parent
b80b378680
commit
b03142782c
|
@ -5083,8 +5083,10 @@ parse_envlist(PyObject* env, Py_ssize_t *envc_ptr)
|
|||
}
|
||||
envc = 0;
|
||||
keys = PyMapping_Keys(env);
|
||||
if (!keys)
|
||||
goto error;
|
||||
vals = PyMapping_Values(env);
|
||||
if (!keys || !vals)
|
||||
if (!vals)
|
||||
goto error;
|
||||
if (!PyList_Check(keys) || !PyList_Check(vals)) {
|
||||
PyErr_Format(PyExc_TypeError,
|
||||
|
|
Loading…
Reference in New Issue