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
(from parent 1:
185a2e3
)
more robust get_node_virt
author
Thierry Parmentelat
<thierry.parmentelat@inria.fr>
Mon, 8 Jul 2013 19:37:37 +0000
(21:37 +0200)
committer
Thierry Parmentelat
<thierry.parmentelat@inria.fr>
Mon, 8 Jul 2013 19:37:37 +0000
(21:37 +0200)
tools.py
patch
|
blob
|
history
diff --git
a/tools.py
b/tools.py
index
4cbfa3b
..
a53c158
100644
(file)
--- a/
tools.py
+++ b/
tools.py
@@
-300,10
+300,10
@@
def get_node_virt ():
except:
pass
logger.log("Computing virt..")
- vs_retcod=subprocess.call ([ 'vserver', '--help' ])
- if vs_retcod == 0:
- virt='vs'
- e
lse
:
+ try:
+ if subprocess.call ([ 'vserver', '--help' ]) ==0: virt='vs'
+ else: virt='lxc'
+ e
xcept
:
virt='lxc'
with file(virt_stamp,"w") as f:
f.write(virt)