summaryrefslogtreecommitdiff
path: root/test/backtest.py
diff options
context:
space:
mode:
authorNed Batchelder <ned@nedbatchelder.com>2011-05-25 19:08:02 -0400
committerNed Batchelder <ned@nedbatchelder.com>2011-05-25 19:08:02 -0400
commit603e508d2aac52311dd9f6dfdeaa3f02e8c0b582 (patch)
tree065ea851c9ab1b5a30d089a5b8ba1d2bb7ace474 /test/backtest.py
parent15d0c81172f7c7cd972aac85538bc5259427fd78 (diff)
downloadpython-coveragepy-603e508d2aac52311dd9f6dfdeaa3f02e8c0b582.tar.gz
The right way to communicate with a subprocess.
Diffstat (limited to 'test/backtest.py')
-rw-r--r--test/backtest.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/backtest.py b/test/backtest.py
index 4576a86..c54171d 100644
--- a/test/backtest.py
+++ b/test/backtest.py
@@ -30,10 +30,10 @@ else:
stdin=subprocess.PIPE, stdout=subprocess.PIPE,
stderr=subprocess.STDOUT
)
- status = proc.wait()
+ output, _ = proc.communicate()
+ status = proc.returncode
# Get the output, and canonicalize it to strings with newlines.
- output = proc.stdout.read()
if not isinstance(output, str):
output = output.decode('utf-8')
output = output.replace('\r', '')