Skip to content
This repository was archived by the owner on Sep 14, 2023. It is now read-only.

Commit 09734a3

Browse files
committed
Improve selinux detection
Fixes: #14
1 parent 98bb0b9 commit 09734a3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pytest_molecule/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def pytest_configure(config):
1919
raise Exception("Failed to ping docker server.")
2020

2121
# validate selinux availability
22-
if sys.platform == 'linux':
22+
if sys.platform == 'linux' and os.path.isfile("/etc/selinux/config"):
2323
try:
2424
import selinux # noqa
2525
except Exception:

0 commit comments

Comments
 (0)