git://git.onelab.eu
/
util-vserver.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ready for tagging
[util-vserver.git]
/
python
/
vserver.py
diff --git
a/python/vserver.py
b/python/vserver.py
index
dd3c3be
..
24b4560
100644
(file)
--- a/
python/vserver.py
+++ b/
python/vserver.py
@@
-456,7
+456,7
@@
class VServer:
cmd_args = [cmd[0]] + map(lambda x: x % arg_subst,
cmd[1:])
print >>log, "executing '%s'" % " ".join(cmd_args)
cmd_args = [cmd[0]] + map(lambda x: x % arg_subst,
cmd[1:])
print >>log, "executing '%s'" % " ".join(cmd_args)
- os.spawnvp(os.P_WAIT,cmd[0],cmd_args)
+ os.spawnvp(os.P_
NO
WAIT,cmd[0],cmd_args)
except:
traceback.print_exc()
os._exit(1)
except:
traceback.print_exc()
os._exit(1)
@@
-509,7
+509,7
@@
def create(vm_name, static = False, ctor = VServer):
if static:
options += ['--static']
ret = os.spawnvp(os.P_WAIT, 'vuseradd', options + [vm_name])
if static:
options += ['--static']
ret = os.spawnvp(os.P_WAIT, 'vuseradd', options + [vm_name])
- if
!os.WIFEXITED(ret) ||
os.WEXITSTATUS(ret) != 0:
+ if
not os.WIFEXITED(ret) or
os.WEXITSTATUS(ret) != 0:
out = "system command ('%s') " % options
if os.WIFEXITED(ret):
out += "failed, rc = %d" % os.WEXITSTATUS(ret)
out = "system command ('%s') " % options
if os.WIFEXITED(ret):
out += "failed, rc = %d" % os.WEXITSTATUS(ret)