Commit c89adcec by cloud

Make shorter is_there_systemd()

parent 19544e52
...@@ -65,11 +65,4 @@ def ns_exec(args, stdin=None): ...@@ -65,11 +65,4 @@ def ns_exec(args, stdin=None):
def is_there_systemd(): def is_there_systemd():
with open(os.devnull, "w") as devnull: return os.path.isfile("/bin/systemctl")
try:
sp.call(["/bin/systemctl", "--version"], stdout=devnull, stderr=devnull)
except OSError:
return False
return True
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment