scripts: dts: Consistently open text files with utf-8.
Zephyr codebase standardizes in UTF-8 as file encoding. To accommodate this, we explicitly pass encoding="utf-8" to Python's open() function, to be independent of any locale setting of a particular system (e.g., CI/build systems oftentimes have "C", i.e. ASCII-only, locale). In a few places, we lacked this parameter, so add it consistently. Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
This commit is contained in:
parent
39ada71688
commit
04da7eaf07
3 changed files with 10 additions and 9 deletions
|
@ -1029,7 +1029,7 @@ def _binding_compat(binding_path):
|
|||
# Uses a regex to avoid having to parse the bindings, which is slow when
|
||||
# done for all bindings.
|
||||
|
||||
with open(binding_path) as binding:
|
||||
with open(binding_path, encoding="utf-8") as binding:
|
||||
for line in binding:
|
||||
match = re.match(r'\s+constraint:\s*"([^"]*)"', line)
|
||||
if match:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue