process: fix handling of the input argument
When using a logfile, we weren't sending input to the child process. (Bitbake rev: 5ec4ca7e45bdf6d259503fc67155395e89ba6329) Signed-off-by: Chris Larson <chris_larson@mentor.com> Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
This commit is contained in:
parent
572bf4b382
commit
043adbfa09
|
@ -63,9 +63,12 @@ class Popen(subprocess.Popen):
|
|||
subprocess.Popen.__init__(self, *args, **options)
|
||||
|
||||
def _logged_communicate(pipe, log, input):
|
||||
if pipe.stdin:
|
||||
if input is not None:
|
||||
pipe.stdin.write(input)
|
||||
pipe.stdin.close()
|
||||
|
||||
bufsize = 512
|
||||
hasoutput = pipe.stdout is not None or pipe.stderr is not None
|
||||
if hasoutput:
|
||||
outdata, errdata = [], []
|
||||
while pipe.poll() is None:
|
||||
if pipe.stdout is not None:
|
||||
|
|
Loading…
Reference in New Issue