mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-28 21:07:55 +00:00
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:
parent
21c02e1732
commit
99f99e8a56
@ -171,6 +171,7 @@ python_sudo_options_as_dict(PyObject *py_self, PyObject *py_args)
|
|||||||
if (py_value == NULL) { // skip values without a key
|
if (py_value == NULL) { // skip values without a key
|
||||||
Py_CLEAR(py_config);
|
Py_CLEAR(py_config);
|
||||||
Py_CLEAR(py_splitted);
|
Py_CLEAR(py_splitted);
|
||||||
|
PyErr_Clear();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user