Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 475f715

Browse files
committed
Explicitly close read and write of Popen to latex
This avoids a warning in the test suite on python3.4. When reading and writing from directly from stdout and stdin of the process they should be explicitly closed afterwards.
1 parent 6204ca8 commit 475f715

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lib/matplotlib/backends/backend_pgf.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -342,9 +342,9 @@ def _cleanup(self):
342342
if not os.path.isdir(self.tmpdir):
343343
return
344344
try:
345-
self.latex_stdin_utf8.close()
346345
self.latex.communicate()
347-
self.latex.wait()
346+
self.latex_stdin_utf8.close()
347+
self.latex.stdout.close()
348348
except:
349349
pass
350350
try:

0 commit comments

Comments
 (0)