If attempting to wait for a subprocess to complete when that
subprocess has filled a pipe and still has data to send swup will get
stuck in a wait while the subprocess is stuck in write (since swup
doesn't read from the buffer until after the wait finishes, the write
can never complete).
Since manual wait is unneeded as subprocess.communicate() will call
wait itself, just remove the extra wait call.
Change-Id: I85dec452cb09b280d2d935ae21f654c25e06a25d
Signed-off-by: William Douglas <william.douglas@intel.com>
sub.Popen(args).wait()
args = shlex.split("zypper -n --reposd-dir %s patch --with-interactive --repo %s " % (repodir, update_id))
p = sub.Popen(args, stderr=sub.PIPE, stdout=sub.PIPE)
- r = p.wait()
(pout, perr) = p.communicate()
print(pout)
print(perr)