File: selinux_binary_policy_path.py

package info (click to toggle)
refpolicy 2%3A2.20210203-7
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 16,044 kB
  • sloc: python: 2,171; makefile: 626; sh: 174; sed: 21; xml: 13; awk: 7
file content (12 lines) | stat: -rw-r--r-- 308 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
#!/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.selinux_binary_policy_path())
except ImportError:
    exit(0)