From 43bf1f92b378dbdc5012d1ddc2e05a8ad4f2df59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Bidoul?= Date: Wed, 21 Aug 2024 22:27:09 +0200 Subject: [PATCH] [FIX] oca-gen-addon-readme: don't use default encoding when inspecting index.html. We just assume it's ascii compatible for what we are looking for in it. --- tools/gen_addon_readme.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/gen_addon_readme.py b/tools/gen_addon_readme.py index 5624244b..bed0775a 100644 --- a/tools/gen_addon_readme.py +++ b/tools/gen_addon_readme.py @@ -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):