From: Chris Lamb Date: Wed, 7 Jul 2010 21:24:36 +0000 (+0100) Subject: Popen.communicate calls stdout.close() which looks like is causing errors w/threads.. X-Git-Url: https://git.decadent.org.uk/gitweb/?a=commitdiff_plain;h=5cf370dcd717b092faf8869fa4a5d102500d6b20;p=dak.git Popen.communicate calls stdout.close() which looks like is causing errors w/threads.. --- diff --git a/daklib/utils.py b/daklib/utils.py index 5c716470..c9b54d07 100755 --- a/daklib/utils.py +++ b/daklib/utils.py @@ -70,7 +70,9 @@ def dak_getstatusoutput(cmd): pipe = subprocess.Popen(cmd, shell=True, universal_newlines=True, stdout=subprocess.PIPE, stderr=subprocess.STDOUT) - output, _ = pipe.communicate() + output = pipe.stdout.read() + + pipe.wait() if output[-1:] == '\n': output = output[:-1]