forked from platformio/platformio-core
Fix typo with UnicodeEncodeError // Issue #2796
This commit is contained in:
@ -62,7 +62,7 @@ def write_file_contents(path, contents):
|
|||||||
try:
|
try:
|
||||||
with open(path, "w") as fp:
|
with open(path, "w") as fp:
|
||||||
return fp.write(contents)
|
return fp.write(contents)
|
||||||
except UnicodeDecodeError:
|
except UnicodeEncodeError:
|
||||||
with io.open(path, "w", encoding="latin-1") as fp:
|
with io.open(path, "w", encoding="latin-1") as fp:
|
||||||
return fp.write(contents)
|
return fp.write(contents)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user