mirror of
https://github.com/kevingruesser/bootstrap-vz.git
synced 2025-08-24 07:26:29 +00:00
Fix minor mistakes in log_call
This commit is contained in:
parent
b25e607388
commit
858e325fac
1 changed files with 4 additions and 10 deletions
|
@ -6,12 +6,6 @@ def log_check_call(command, stdin=None, env=None, shell=False):
|
||||||
return stdout
|
return stdout
|
||||||
|
|
||||||
|
|
||||||
def stream_readline(args):
|
|
||||||
stream, q = args
|
|
||||||
for line in iter(stream.readline, ''):
|
|
||||||
q.put((stream, line.strip()))
|
|
||||||
|
|
||||||
|
|
||||||
def log_call(command, stdin=None, env=None, shell=False):
|
def log_call(command, stdin=None, env=None, shell=False):
|
||||||
import subprocess
|
import subprocess
|
||||||
import logging
|
import logging
|
||||||
|
@ -34,10 +28,10 @@ def log_call(command, stdin=None, env=None, shell=False):
|
||||||
q.put((stream, line.strip()))
|
q.put((stream, line.strip()))
|
||||||
|
|
||||||
if stdin is not None:
|
if stdin is not None:
|
||||||
log.debug(' stdin: {stdin}'.format(stdin=stdin))
|
log.debug(' stdin: {stdin}'.format(stdin=stdin))
|
||||||
process.stdin.write(stdin + "\n")
|
process.stdin.write(stdin + "\n")
|
||||||
process.stdin.flush()
|
process.stdin.flush()
|
||||||
process.stdin.close()
|
process.stdin.close()
|
||||||
|
|
||||||
stdout = []
|
stdout = []
|
||||||
stderr = []
|
stderr = []
|
||||||
|
|
Loading…
Add table
Reference in a new issue