]> git.decadent.org.uk Git - dak.git/commitdiff
Merge remote branch 'lamby/master' into merge
authorJoerg Jaspert <joerg@debian.org>
Wed, 7 Jul 2010 21:03:38 +0000 (23:03 +0200)
committerJoerg Jaspert <joerg@debian.org>
Wed, 7 Jul 2010 21:03:38 +0000 (23:03 +0200)
* lamby/master:
  Fix race condition in our commands.getstatusoutput monkeypatch

Signed-off-by: Joerg Jaspert <joerg@debian.org>
daklib/utils.py

index 0896d57839eb335f30f375a602519cb727deb15c..5c7164705ee4147fe7f07c67d1adf0180e438cea 100755 (executable)
@@ -70,7 +70,7 @@ def dak_getstatusoutput(cmd):
     pipe = subprocess.Popen(cmd, shell=True, universal_newlines=True,
         stdout=subprocess.PIPE, stderr=subprocess.STDOUT)
 
-    output = "".join(pipe.stdout.readlines())
+    output, _ = pipe.communicate()
 
     if output[-1:] == '\n':
         output = output[:-1]