subprocess: don't use wait()
http://docs.python.org/2/library/subprocess.html#subprocess.Popen.wait Je n'avais pas lu le warning ...
This commit is contained in:
parent
fc40d2e6c9
commit
f9956f913a
1 changed files with 5 additions and 3 deletions
|
@ -300,9 +300,11 @@ def remote_command(options, command, arg=None, stdin_contents=None):
|
||||||
proc = remote_proc(options, command, arg)
|
proc = remote_proc(options, command, arg)
|
||||||
if stdin_contents is not None:
|
if stdin_contents is not None:
|
||||||
proc.stdin.write(json.dumps(stdin_contents))
|
proc.stdin.write(json.dumps(stdin_contents))
|
||||||
proc.stdin.close()
|
proc.stdin.flush()
|
||||||
ret = proc.wait()
|
|
||||||
raw_out = proc.stdout.read()
|
raw_out, raw_err = proc.communicate()
|
||||||
|
ret = proc.returncode
|
||||||
|
|
||||||
if ret != 0:
|
if ret != 0:
|
||||||
if not options.quiet:
|
if not options.quiet:
|
||||||
print((u"Mauvais code retour côté serveur, voir erreur " +
|
print((u"Mauvais code retour côté serveur, voir erreur " +
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue