generate_expected_output: Open the file as binary.

Otherwise write() for my python (OS X 2.7) wants strings, which is incorrect.

Change-Id: Ibd9d050646d1039ba8370d121dd25756ceffdb7a
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
This commit is contained in:
Robin Burchell 2015-11-04 11:52:47 +01:00 committed by Robin Burchell
parent 9626baaea9
commit df757a2e62

View File

@ -99,7 +99,7 @@ def generateTestData(testname):
cmd = [getTestForPath(testname) + ' -' + format + ' ' + extraArgs.get(testname, '')]
result = 'expected_' + testname + '.' + format
data = subprocess.Popen(cmd, stdout=subprocess.PIPE, shell=True).communicate()[0]
out = open(result, 'w')
out = open(result, 'wb')
out.write(data)
out.close()
replaceInFile(result)