git://git.onelab.eu
/
nodemanager.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
84751d3
)
fix _has_systemctl referenced before assignment in python2.7
author
Scott Baker
<smbaker@gmail.com>
Mon, 7 Apr 2014 22:33:37 +0000
(15:33 -0700)
committer
Scott Baker
<smbaker@gmail.com>
Mon, 7 Apr 2014 22:33:37 +0000
(15:33 -0700)
tools.py
patch
|
blob
|
history
diff --git
a/tools.py
b/tools.py
index
334f33f
..
02e2ab9
100644
(file)
--- 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