Skip to content

Commit

Permalink
[FIX] oca-gen-addon-readme: don't use default encoding
Browse files Browse the repository at this point in the history
when inspecting index.html. We just assume it's ascii compatible
for what we are looking for in it.
  • Loading branch information
sbidoul committed Aug 21, 2024
1 parent d5fab7e commit 43bf1f9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tools/gen_addon_readme.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,8 +408,8 @@ def gen_one_addon_index(readme_filename):
index_dir = os.path.join(addon_dir, "static", "description")
index_filename = os.path.join(index_dir, "index.html")
if os.path.exists(index_filename):
with open(index_filename) as f:
if "oca-gen-addon-readme" not in f.read():
with open(index_filename, "rb") as f:
if b"oca-gen-addon-readme" not in f.read():
# index was created manually
return
if not os.path.isdir(index_dir):
Expand Down

0 comments on commit 43bf1f9

Please sign in to comment.