Use Popen.communicate instead of reading the individual streams (why needed?)
authorAaron Bentley <abentley@panoramicfeedback.com>
Wed, 19 Jul 2006 14:04:27 +0000 (10:04 -0400)
committerAaron Bentley <abentley@panoramicfeedback.com>
Wed, 19 Jul 2006 14:04:27 +0000 (10:04 -0400)
.bzrignore
libbe/rcs.py

index 5ddfb0e244637757ec3876798142fd766df79e20..b5e01753a70008401ddd337db3b639dcdced602e 100644 (file)
@@ -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
index ac9673457cc647ea5377a2935a89b1fe193ebaad..e7097aac57cf74a257d1bdf47934f31d7c2ab36f 100644 (file)
@@ -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)