mirror of
https://github.com/godotengine/godot.git
synced 2025-10-19 16:03:29 +00:00
Enforce \n
eol for Python writes
• Ensure utf-8 encoding if previously unspecified
This commit is contained in:
parent
f28964805e
commit
d9fa40f2df
30 changed files with 63 additions and 59 deletions
|
@ -40,7 +40,7 @@ def run_in_subprocess(builder_function):
|
|||
args = (target, source, filtered_env)
|
||||
data = dict(fn=function_name, args=args)
|
||||
json_path = os.path.join(os.environ["TMP"], uuid.uuid4().hex + ".json")
|
||||
with open(json_path, "wt") as json_file:
|
||||
with open(json_path, "wt", encoding="utf-8", newline="\n") as json_file:
|
||||
json.dump(data, json_file, indent=2)
|
||||
json_file_size = os.stat(json_path).st_size
|
||||
|
||||
|
@ -138,7 +138,7 @@ def generate_export_icons(platform_path, platform_name):
|
|||
|
||||
# NOTE: It is safe to generate this file here, since this is still executed serially.
|
||||
wf = export_path + "/" + name + "_svg.gen.h"
|
||||
with open(wf, "w") as svgw:
|
||||
with open(wf, "w", encoding="utf-8", newline="\n") as svgw:
|
||||
svgw.write(svg_str)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue