diff --git a/backend/localplatform.py b/backend/localplatform.py index 6989fcb96..172341186 100644 --- a/backend/localplatform.py +++ b/backend/localplatform.py @@ -45,7 +45,8 @@ def get_log_level() -> int: def get_selinux() -> bool: if ON_LINUX: from subprocess import check_output - if (check_output("getenforce").decode("ascii").strip("\n") == "Enforcing"): + import shutil + if (shutil.which(getenforce) is not None and (check_output("getenforce").decode("ascii").strip("\n") is "Enforcing")): return True else: return False