Commit 51545ee5 authored by Abseil Team's avatar Abseil Team Committed by Gennadiy Rozental
Browse files

Googletest export

Make generating goldens work with Python 3

golden_file.write(output) fails with Python 3 with:
TypeError: a bytes-like object is required, not 'str'
PiperOrigin-RevId: 282316101
parent 679bfec6
......@@ -331,7 +331,7 @@ if __name__ == '__main__':
if CAN_GENERATE_GOLDEN_FILE:
output = GetOutputOfAllCommands()
golden_file = open(GOLDEN_PATH, 'wb')
golden_file.write(output)
golden_file.write(output.encode())
golden_file.close()
else:
message = (
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment