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

Skip to content

Commit 78e7531

Browse files
committed
Ensure that file is closed in texmanager
1 parent 04536ea commit 78e7531

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/matplotlib/texmanager.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,10 +70,10 @@ def dvipng_hack_alpha():
7070
try:
7171
p = Popen(['dvipng', '-version'], stdin=PIPE, stdout=PIPE,
7272
stderr=STDOUT, close_fds=(sys.platform != 'win32'))
73+
stdin, stderr = p.communicate()
7374
except OSError:
7475
mpl.verbose.report('No dvipng was found', 'helpful')
7576
return False
76-
stdin, stdout = p.stdin, p.stdout
7777
for line in stdout:
7878
if line.startswith(b'dvipng '):
7979
version = line.split()[-1]

0 commit comments

Comments
 (0)