docs: Write files in binary mode
For python3, the mode for writing the file is required. Change-Id: Idc17e36bb88c786027c0d6476b54844ae5d7f81e
This commit is contained in:
parent
1c9a4eae9f
commit
a91f762c33
@ -201,7 +201,7 @@ def write_file(filename, content):
|
|||||||
if not os.path.isdir(os.path.dirname(file_path)):
|
if not os.path.isdir(os.path.dirname(file_path)):
|
||||||
os.makedirs(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'))
|
f.write(content.encode('utf-8'))
|
||||||
|
|
||||||
return True
|
return True
|
||||||
|
Loading…
x
Reference in New Issue
Block a user