From 1c86e752275f2bffdb4ce39b6313ce0302ef1d6e Mon Sep 17 00:00:00 2001 From: Abhijeet Kasurde Date: Thu, 21 Nov 2024 11:22:20 -0800 Subject: [PATCH] Remove selinux import (#83674) (#84317) Remove selinux import which was kept for backward compatibility Fixes: #83657 Signed-off-by: Abhijeet Kasurde (cherry picked from commit d23a2de5f249727e70c1b45c3b22dc1dee7c5865) --- changelogs/fragments/selinux_import.yml | 3 +++ lib/ansible/module_utils/common/file.py | 6 ------ 2 files changed, 3 insertions(+), 6 deletions(-) create mode 100644 changelogs/fragments/selinux_import.yml diff --git a/changelogs/fragments/selinux_import.yml b/changelogs/fragments/selinux_import.yml new file mode 100644 index 00000000000..881e41959ef --- /dev/null +++ b/changelogs/fragments/selinux_import.yml @@ -0,0 +1,3 @@ +--- +minor_changes: + - remove extraneous selinux import (https://github.com/ansible/ansible/issues/83657). diff --git a/lib/ansible/module_utils/common/file.py b/lib/ansible/module_utils/common/file.py index b62e4c64f50..1b976fd9329 100644 --- a/lib/ansible/module_utils/common/file.py +++ b/lib/ansible/module_utils/common/file.py @@ -7,12 +7,6 @@ import os import stat import re -try: - import selinux # pylint: disable=unused-import - HAVE_SELINUX = True -except ImportError: - HAVE_SELINUX = False - FILE_ATTRIBUTES = { 'A': 'noatime',