Commit c89adcec by cloud

Make shorter is_there_systemd()

parent 19544e52
......@@ -65,11 +65,4 @@ def ns_exec(args, stdin=None):
def is_there_systemd():
with open(os.devnull, "w") as devnull:
try:
sp.call(["/bin/systemctl", "--version"], stdout=devnull, stderr=devnull)
except OSError:
return False
return True
return os.path.isfile("/bin/systemctl")
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