docs: Write files in binary mode

For python3, the mode for writing the file is required.

Change-Id: Idc17e36bb88c786027c0d6476b54844ae5d7f81e
This commit is contained in:
Jesse Pretorius 2018-10-04 00:53:39 +01:00
parent 1c9a4eae9f
commit a91f762c33
1 changed files with 1 additions and 1 deletions

View File

@ -201,7 +201,7 @@ def write_file(filename, content):
if not os.path.isdir(os.path.dirname(file_path)):
os.makedirs(os.path.dirname(file_path))
with open(file_path, 'w') as f:
with open(file_path, 'wb') as f:
f.write(content.encode('utf-8'))
return True