From df757a2e62456a919dfe2e983f003123c3eb151c Mon Sep 17 00:00:00 2001 From: Robin Burchell Date: Wed, 4 Nov 2015 11:52:47 +0100 Subject: 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 --- tests/auto/testlib/selftests/generate_expected_output.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/testlib/selftests/generate_expected_output.py b/tests/auto/testlib/selftests/generate_expected_output.py index 83c617fee5..1152f965ef 100755 --- a/tests/auto/testlib/selftests/generate_expected_output.py +++ b/tests/auto/testlib/selftests/generate_expected_output.py @@ -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) -- cgit v1.2.3