Skip to content

Commit

Permalink
Handle possible missing binary
Browse files Browse the repository at this point in the history
  • Loading branch information
RodoMa92 committed Aug 26, 2023
1 parent ae67be9 commit ada5f7a
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backend/localplatform.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ada5f7a

Please sign in to comment.