X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=tools.py;h=02e2ab9b7193b17f8f9aef7e9e6ccd3f9f65215a;hb=9e6b9c1ea9e020c55c85b433bac47231d63e9ffd;hp=334f33f297e3017a7e764f4600f802a68ca9c18c;hpb=4bf2fe496500faab4eacd9e526424559e6901dea;p=nodemanager.git diff --git a/tools.py b/tools.py index 334f33f..02e2ab9 100644 --- a/tools.py +++ b/tools.py @@ -314,6 +314,7 @@ def get_node_virt (): # cache result in memory as _has_systemctl _has_systemctl=None def has_systemctl (): + global _has_systemctl if _has_systemctl is None: _has_systemctl = (subprocess.call([ 'systemctl', '--help' ]) == 0) return _has_systemctl