mirror of
https://github.com/SELinuxProject/setools
synced 2025-03-29 14:56:21 +00:00
qpol.i: include filename info on policy file opening errors
Changes errors from this: $ ./seinfo eggs [Errno 2] No such file or directory to this: $ ./seinfo eggs [Errno 2] No such file or directory: 'eggs'
This commit is contained in:
parent
f3617938a7
commit
be92a0a11e
@ -185,7 +185,7 @@ typedef enum qpol_capability
|
|||||||
if (errno == EINVAL) {
|
if (errno == EINVAL) {
|
||||||
PyErr_SetString(PyExc_SyntaxError, "Invalid policy.");
|
PyErr_SetString(PyExc_SyntaxError, "Invalid policy.");
|
||||||
} else {
|
} else {
|
||||||
PyErr_SetFromErrno(PyExc_OSError);
|
PyErr_SetFromErrnoWithFilename(PyExc_OSError, arg1);
|
||||||
}
|
}
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user