selinux: use compat.selinux

Fixes: #502

Signed-off-by: Abhijeet Kasurde <akasurde@redhat.com>
This commit is contained in:
Abhijeet Kasurde 2024-07-12 13:22:24 -07:00
parent f41f08e9e3
commit 3351416302
2 changed files with 4 additions and 1 deletions

View file

@ -0,0 +1,3 @@
---
bugfixes:
- selinux - use compat.selinux instead of selinux (https://github.com/ansible-collections/ansible.posix/issues/502).

View file

@ -97,7 +97,7 @@ import traceback
SELINUX_IMP_ERR = None
try:
import selinux
from ansible.module_utils.compat import selinux
HAS_SELINUX = True
except ImportError:
SELINUX_IMP_ERR = traceback.format_exc()