From: Aaron Bentley Date: Wed, 19 Jul 2006 14:04:27 +0000 (-0400) Subject: Use Popen.communicate instead of reading the individual streams (why needed?) X-Git-Tag: 1.0.0~185^2~10 X-Git-Url: http://git.tremily.us/gitweb.cgi?a=commitdiff_plain;h=906ef74e2e941794df5297b5622be58d8c352e50;p=be.git Use Popen.communicate instead of reading the individual streams (why needed?) --- diff --git a/.bzrignore b/.bzrignore index 5ddfb0e..b5e0175 100644 --- a/.bzrignore +++ b/.bzrignore @@ -2,3 +2,7 @@ Bugs-Everywhere-Web/beweb/config.py ./build Bugs-Everywhere-Web/beweb/database.sqlite Bugs-Everywhere-Web/beweb/catwalk-session +*.pyc +*.~1~ +*.sw[pon] +*.shelf diff --git a/libbe/rcs.py b/libbe/rcs.py index ac96734..e7097aa 100644 --- a/libbe/rcs.py +++ b/libbe/rcs.py @@ -45,9 +45,8 @@ class CommandError(Exception): self.status = status def invoke(args, expect=(0,)): - q = Popen(args, stdin=PIPE, stdout=PIPE, stderr=PIPE) - output = q.stdout.read() - error = q.stderr.read() + q = Popen(args, stdout=PIPE, stderr=PIPE) + output, error = q.communicate() status = q.wait() if status not in expect: raise CommandError(error, status)