explicit string encoding when writing to file in python3
This commit is contained in:
@@ -21,7 +21,7 @@ def substitute(build, output_dir):
|
||||
# populate template
|
||||
populated = template.render(build=build, time=time)
|
||||
with open(os.path.join(output_dir, 'buildInformation.m'), 'wb') as f:
|
||||
f.write(populated)
|
||||
f.write(populated.encode('utf-8'))
|
||||
|
||||
if __name__ == "__main__":
|
||||
"""
|
||||
|
Reference in New Issue
Block a user