Skip to content

Commit

Permalink
Simplify subprocess cleanup.
Browse files Browse the repository at this point in the history
  • Loading branch information
jamadden committed Apr 9, 2020
1 parent 24bc033 commit 30309ca
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
7 changes: 3 additions & 4 deletions src/z3c/recipe/compattest/runner.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,9 @@ def poll(self):
self.exitcode = self.process.poll()
if self.exitcode is not None and self.process is not None:
self.end = time.time()
# We're done, get it all
data = self.process.stdout.read()
# Close the pipes and cleanup.
self.process.communicate()
# We're done, get all remaining output, and
# close the pipes.
data = self.process.communicate()[0]
self.process = None
else:
# We're not done, so just get some
Expand Down
1 change: 0 additions & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ setenv =
[testenv:coverage]
skip_install = true
commands =
coverage erase
coverage combine
coverage html -i
coverage xml -i
Expand Down

0 comments on commit 30309ca

Please sign in to comment.