From d9fa40f2df44d775e82332577d44de402b23611f Mon Sep 17 00:00:00 2001 From: Thaddeus Crews Date: Sat, 9 Mar 2024 14:29:24 -0600 Subject: Enforce `\n` eol for Python writes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit • Ensure utf-8 encoding if previously unspecified --- main/main_builders.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'main') diff --git a/main/main_builders.py b/main/main_builders.py index 59d9d7dc3d..69277e49df 100644 --- a/main/main_builders.py +++ b/main/main_builders.py @@ -14,7 +14,7 @@ def make_splash(target, source, env): with open(src, "rb") as f: buf = f.read() - with open(dst, "w") as g: + with open(dst, "w", encoding="utf-8", newline="\n") as g: g.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n") g.write("#ifndef BOOT_SPLASH_H\n") g.write("#define BOOT_SPLASH_H\n") @@ -34,7 +34,7 @@ def make_splash_editor(target, source, env): with open(src, "rb") as f: buf = f.read() - with open(dst, "w") as g: + with open(dst, "w", encoding="utf-8", newline="\n") as g: g.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n") g.write("#ifndef BOOT_SPLASH_EDITOR_H\n") g.write("#define BOOT_SPLASH_EDITOR_H\n") @@ -55,7 +55,7 @@ def make_app_icon(target, source, env): with open(src, "rb") as f: buf = f.read() - with open(dst, "w") as g: + with open(dst, "w", encoding="utf-8", newline="\n") as g: g.write("/* THIS FILE IS GENERATED DO NOT EDIT */\n") g.write("#ifndef APP_ICON_H\n") g.write("#define APP_ICON_H\n") -- cgit v1.2.3