selinux-refpolicy/support/policyvers.py
2017-03-18 18:38:20 +01:00

13 lines
301 B
Python

#!/usr/bin/env python3
try:
import warnings
with warnings.catch_warnings():
warnings.filterwarnings("ignore", category=PendingDeprecationWarning)
import selinux
if selinux.is_selinux_enabled():
print(selinux.security_policyvers())
except ImportError:
exit(0)