fedora-selinux / selinux

Fedora SELinux Userspace
Other
21 stars 17 forks source link

python/sepolicy: Fix get_real_type_name to handle query failure properly #55

Closed vmojzis closed 6 years ago

vmojzis commented 6 years ago

Setools 4 no longer emits RuntimeError when TypeQuery fails, which causes the following failure when searching for nonexistent type:

File "/usr/lib/python3.7/site-packages/sepolicy/init.py", line 454, in get_real_type_name return next(info(TYPE, name))["name"] StopIteration

vmojzis commented 6 years ago

This commit fixes https://github.com/fedora-selinux/selinux/commit/bd7d523d9613bb0b018b0591f30bb945d7e9d626

bachradsusi commented 6 years ago

https://github.com/fedora-selinux/selinux/commit/f63677145675024f6a1dbdab595c0be1403bd592