From c6ea4f4498095c36ec634b14a3a85888133d204f Mon Sep 17 00:00:00 2001 From: William Douglas Date: Wed, 7 Aug 2013 15:36:55 -0700 Subject: [PATCH] Fix bug when filling subprocess pipe 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 --- swup.py | 1 - 1 file changed, 1 deletion(-) diff --git a/swup.py b/swup.py index cf270b1..a291d9a 100755 --- a/swup.py +++ b/swup.py @@ -250,7 +250,6 @@ def install_update(update_data): 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) -- 2.7.4