plugins/python/sudo_python_module.c: fix options_as_dict if no equal sign

The intented behaviour was that those get skipped, but the PyList_GetItem
sets the interpreter into error state, so python has raised exception.
This commit is contained in:
Robert Manner
2020-02-06 16:33:25 +01:00
committed by Todd C. Miller
parent 21c02e1732
commit 99f99e8a56

View File

@@ -171,6 +171,7 @@ python_sudo_options_as_dict(PyObject *py_self, PyObject *py_args)
if (py_value == NULL) { // skip values without a key
Py_CLEAR(py_config);
Py_CLEAR(py_splitted);
PyErr_Clear();
continue;
}