selinux-refpolicy/support/policyvers.py

13 lines
301 B
Python
Raw Normal View History

2017-03-14 23:32:11 +00:00
#!/usr/bin/env python3
try:
2017-03-18 17:38:20 +00:00
import warnings
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=PendingDeprecationWarning)
import selinux
2017-03-14 23:32:11 +00:00
if selinux.is_selinux_enabled():
print(selinux.security_policyvers())
except ImportError:
exit(0)