Fix error when policy does not match the system.
This commit is contained in:
parent
d0b1e420e7
commit
43c9e8c7e2
|
@ -66,7 +66,6 @@ PyObject *wrap_policy(PyObject *UNUSED(self), PyObject *args){
|
|||
}
|
||||
apol_vector_destroy(&mod_paths);
|
||||
|
||||
policy_load_options |= QPOL_POLICY_OPTION_MATCH_SYSTEM;
|
||||
policy = apol_policy_create_from_policy_path(pol_path, policy_load_options, NULL, NULL);
|
||||
apol_policy_path_destroy(&pol_path);
|
||||
if (!policy) {
|
||||
|
@ -87,7 +86,7 @@ static PyMethodDef methods[] = {
|
|||
{NULL, NULL, 0, NULL} /* sentinel */
|
||||
};
|
||||
|
||||
void init_policy() {
|
||||
void init_policy(void) {
|
||||
PyObject *m;
|
||||
m = Py_InitModule("_policy", methods);
|
||||
init_info(m);
|
||||
|
|
Loading…
Reference in New Issue