forked from platformio/platformio-core
Specify encoding for "open()" functions
This commit is contained in:
1 parent
b9219a2b62
commit
d819617d2b
28 files changed
+63
-43
No files matched your search
@@ -156,7 +156,9 @@ def build_contrib_pysite_package(target_dir, with_metadata=True):
|
||||
subprocess.check_call(args + [dep])
|
||||
|
||||
# build manifests
|
||||
with open(os.path.join(target_dir, "package.json"), "w") as fp:
|
||||
with open(
|
||||
os.path.join(target_dir, "package.json"), mode="w", encoding="utf8"
|
||||
) as fp:
|
||||
json.dump(
|
||||
dict(
|
||||
name="contrib-pysite",
|
||||
|
||||
@@ -44,7 +44,9 @@ class LibraryPackageManager(BasePackageManager): # pylint: disable=too-many-anc
|
||||
root_dir = self.find_library_root(path)
|
||||
|
||||
# automatically generate library manifest
|
||||
with open(os.path.join(root_dir, "library.json"), "w") as fp:
|
||||
with open(
|
||||
os.path.join(root_dir, "library.json"), mode="w", encoding="utf8"
|
||||
) as fp:
|
||||
json.dump(
|
||||
dict(
|
||||
name=spec.name,
|
||||
|
||||
Reference in new issue
Block a user