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

Skip to content

Commit e73625e

Browse files
authored
Merge pull request #7670 from QuLogic/convert-decode-message
Decode error messages from image converters.
2 parents 2bc075e + 3100cd0 commit e73625e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

lib/matplotlib/testing/compare.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,8 @@ def get_file_hash(path, block_size=2 ** 20):
113113
def make_external_conversion_command(cmd):
114114
def convert(old, new):
115115
cmdline = cmd(old, new)
116-
pipe = subprocess.Popen(
117-
cmdline, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
116+
pipe = subprocess.Popen(cmdline, universal_newlines=True,
117+
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
118118
stdout, stderr = pipe.communicate()
119119
errcode = pipe.wait()
120120
if not os.path.exists(new) or errcode:
@@ -224,8 +224,8 @@ def verify(filename):
224224
verifier = verifiers.get(extension, None)
225225
if verifier is not None:
226226
cmd = verifier(filename)
227-
pipe = subprocess.Popen(
228-
cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE)
227+
pipe = subprocess.Popen(cmd, universal_newlines=True,
228+
stdout=subprocess.PIPE, stderr=subprocess.PIPE)
229229
stdout, stderr = pipe.communicate()
230230
errcode = pipe.wait()
231231
if errcode != 0:

0 commit comments

Comments
 (0)