]>
Commit | Line | Data |
---|---|---|
5ce04bfd AM |
1 | === modified file 'libraries/libapparmor/swig/SWIG/libapparmor.i' |
2 | --- libraries/libapparmor/swig/SWIG/libapparmor.i 2014-01-06 22:08:55 +0000 | |
3 | +++ libraries/libapparmor/swig/SWIG/libapparmor.i 2014-03-07 19:54:12 +0000 | |
4 | @@ -9,6 +9,16 @@ | |
5 | %include "typemaps.i" | |
6 | %include <aalogparse.h> | |
7 | ||
8 | +#ifdef SWIGPYTHON | |
9 | +%exception { | |
10 | + $action | |
11 | + if (result < 0) { | |
12 | + PyErr_SetFromErrno(PyExc_OSError); | |
13 | + return NULL; | |
14 | + } | |
15 | +} | |
16 | +#endif | |
17 | + | |
18 | /* swig doesn't like the macro magic we do in apparmor.h so the fn prototypes | |
19 | * are manually inserted here | |
20 | */ | |
21 | @@ -37,3 +37,5 @@ | |
22 | extern int aa_getcon(char **con, char **mode); | |
23 | extern int aa_getpeercon_raw(int fd, char *buffer, int *size); | |
24 | extern int aa_getpeercon(int fd, char **con); | |
25 | + | |
26 | +%exception; | |
27 |