summaryrefslogtreecommitdiffstats
path: root/misc/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'misc/scripts')
-rwxr-xr-xmisc/scripts/check_ci_log.py2
-rwxr-xr-xmisc/scripts/copyright_headers.py4
2 files changed, 3 insertions, 3 deletions
diff --git a/misc/scripts/check_ci_log.py b/misc/scripts/check_ci_log.py
index d979d373de..d024a3e375 100755
--- a/misc/scripts/check_ci_log.py
+++ b/misc/scripts/check_ci_log.py
@@ -9,7 +9,7 @@ if len(sys.argv) < 2:
fname = sys.argv[1]
-with open(fname.strip(), "r") as fileread:
+with open(fname.strip(), "r", encoding="utf-8") as fileread:
file_contents = fileread.read()
# If find "ERROR: AddressSanitizer:", then happens invalid read or write
diff --git a/misc/scripts/copyright_headers.py b/misc/scripts/copyright_headers.py
index 82a4477cc0..2b1201b3c0 100755
--- a/misc/scripts/copyright_headers.py
+++ b/misc/scripts/copyright_headers.py
@@ -69,11 +69,11 @@ for f in sys.argv[1:]:
# In a second pass, we skip all consecutive comment lines starting with "/*",
# then we can append the rest (step 2).
- with open(fname.strip(), "r") as fileread:
+ with open(fname.strip(), "r", encoding="utf-8") as fileread:
line = fileread.readline()
header_done = False
- while line.strip() == "": # Skip empty lines at the top
+ while line.strip() == "" and line != "": # Skip empty lines at the top
line = fileread.readline()
if line.find("/**********") == -1: # Godot header starts this way