From c3799523252e08ae21389650a7f9c688271d4bc5 Mon Sep 17 00:00:00 2001 From: Scott Baker Date: Mon, 7 Apr 2014 15:33:37 -0700 Subject: [PATCH] fix _has_systemctl referenced before assignment in python2.7 --- tools.py | 1 + 1 file changed, 1 insertion(+) 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 -- 2.43.0