mirror of
https://github.com/platformio/platformio-core.git
synced 2025-07-29 17:47:14 +02:00
Fix typo with UnicodeEncodeError // Issue #2796
This commit is contained in:
@ -62,7 +62,7 @@ def write_file_contents(path, contents):
|
||||
try:
|
||||
with open(path, "w") as fp:
|
||||
return fp.write(contents)
|
||||
except UnicodeDecodeError:
|
||||
except UnicodeEncodeError:
|
||||
with io.open(path, "w", encoding="latin-1") as fp:
|
||||
return fp.write(contents)
|
||||
|
||||
|
Reference in New Issue
Block a user