Skip to content

Commit

Permalink
Merge branch 'development' of https://github.com/arendst/Tasmota into…
Browse files Browse the repository at this point in the history
… development
  • Loading branch information
arendst committed Sep 13, 2023
2 parents fffd68a + 8246410 commit f9bfa1c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion lib/libesp32/berry/tools/coc/block_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ def name(self, block):

def writefile(self, filename, text):
otext = "#include \"be_constobj.h\"\n\n" + text
with open(filename, "w") as f:
with open(filename, "w", encoding='utf-8') as f:
f.write(otext)

def dumpfile(self, path):
Expand Down
2 changes: 1 addition & 1 deletion lib/libesp32/berry/tools/coc/coc
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class builder:
if re.search(r"\.(h|c|cc|cpp)$", filename):
# print(f"> parse {filename}")
text = ""
with open(filename) as f:
with open(filename, encoding='utf-8') as f:
text = f.read()
# print(f"> len(text)={len(text)}")
parser = coc_parser(text)
Expand Down
2 changes: 1 addition & 1 deletion lib/libesp32/berry/tools/coc/macro_table.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ def parse_value(self, s):

def scan_file(self, filename):
str = ""
with open(filename) as f:
with open(filename, encoding='utf-8') as f:
str = f.read()
r = macro_table.pat.findall(str)
for it in r:
Expand Down
6 changes: 3 additions & 3 deletions lib/libesp32_lvgl/lv_binding_berry/tools/preprocessor.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ def clean_source(raw):
# headers_names = [ '../../lib/libesp32_lvgl/LVGL/src/lv_api_map.h' ]

output_filename = "../mapping/lv_funcs.h"
sys.stdout = open(output_filename, 'w')
sys.stdout = open(output_filename, 'w', encoding='utf-8')

print("""
// Automatically generated from LVGL source with `python3 preprocessor.py`
Expand Down Expand Up @@ -121,7 +121,7 @@ def clean_source(raw):
""")

for header_name in headers_names:
with open(header_name) as f:
with open(header_name, encoding='utf-8') as f:
print("// " + header_name)
raw = clean_source(f.read())

Expand Down Expand Up @@ -198,7 +198,7 @@ def clean_source(raw):
headers_names = list_files(lv_src_prefix, lv_fun_globs)

output_filename = "../mapping/lv_enum.h"
sys.stdout = open(output_filename, 'w')
sys.stdout = open(output_filename, 'w', encoding='utf-8')
print("""// ======================================================================
// Functions
// ======================================================================
Expand Down
2 changes: 1 addition & 1 deletion pio-tools/metrics-firmware.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def firm_metrics(source, target, env):
env.Execute("$PYTHONEXE -m tasmota_metrics \"" + str(tasmotapiolib.get_source_map_path(env).resolve()) + "\"")
elif env["PIOPLATFORM"] == "espressif8266":
map_file = join(env.subst("$BUILD_DIR")) + os.sep + "firmware.map"
with open(map_file,'r') as f:
with open(map_file,'r', encoding='utf-8') as f:
phrase = "_text_end = ABSOLUTE (.)"
for line in f:
if phrase in line:
Expand Down

0 comments on commit f9bfa1c

Please sign in to comment.