Commit bdfbc9e7 by Czémán Arnold

Prettify is_there_systemd()

parent 2df3a3d6
...@@ -65,13 +65,13 @@ def ns_exec(args, stdin=None): ...@@ -65,13 +65,13 @@ def ns_exec(args, stdin=None):
def is_there_systemd(): def is_there_systemd():
devnull=open(os.devnull,"w") devnull = open(os.devnull, "w")
try: try:
sp.call(["/bin/systemctl","--version"],stdout=devnull,stderr=devnull) sp.call(["/bin/systemctl", "--version"], stdout=devnull, stderr=devnull)
except OSError: except OSError:
devnull.close()
return False return False
devnull.close() finally:
return True devnull.close()
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