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
commit8f7bf68908351fbe790f4778307368bbf1adc455 (patch)
tree67098cd5f48b9930d269cc3ad8a0bce18992bf32 /test/backtest.py
parent511abdd3a251eb2d5c9a0dd8912c9c52c6fb52b8 (diff)
downloadpython-coveragepy-git-8f7bf68908351fbe790f4778307368bbf1adc455.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 4576a865..c54171d3 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', '')