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:
Chris PeBenito 2015-06-15 15:11:12 -04:00
parent f3617938a7
commit be92a0a11e

View File

@ -185,7 +185,7 @@ typedef enum qpol_capability
if (errno == EINVAL) {
PyErr_SetString(PyExc_SyntaxError, "Invalid policy.");
} else {
PyErr_SetFromErrno(PyExc_OSError);
PyErr_SetFromErrnoWithFilename(PyExc_OSError, arg1);
}
return NULL;
}