ci: fix find_build_apps.py failure with py3 due to non ascii chars

find_build_apps.py would fail when reading non-ascii chars on systems where
the default encoding was ascii.
This commit is contained in:
Marius Vikhammer 2020-06-09 11:35:08 +08:00
parent 11269df516
commit c39b3730bf

View file

@ -8,6 +8,7 @@ from collections import namedtuple
import logging import logging
import json import json
import typing import typing
from io import open
DEFAULT_TARGET = "esp32" DEFAULT_TARGET = "esp32"
@ -320,7 +321,7 @@ class BuildSystem(object):
readme_path = get_md_or_rst(os.path.dirname(app_path)) readme_path = get_md_or_rst(os.path.dirname(app_path))
if not readme_path: if not readme_path:
return None return None
with open(readme_path, "r") as readme_file: with open(readme_path, "r", encoding='utf8') as readme_file:
return readme_file.read() return readme_file.read()
@staticmethod @staticmethod