feat(tools): Enforce utf-8 encoding with open() function

This commit is contained in:
Marek Fiala
2025-01-10 13:52:58 +08:00
committed by BOT
parent 73d1c139e7
commit b37383f75b
39 changed files with 113 additions and 125 deletions
+1 -2
View File
@@ -4,7 +4,6 @@
#
# SPDX-License-Identifier: Apache-2.0
#
import json
import logging
import os.path
@@ -26,7 +25,7 @@ def get_prefix_map_gdbinit_path(prog_path): # type: (str) -> Any
logging.warning('%s does not exist. Please build the app with "idf.py build"', desc_path)
return ''
with open(desc_path, 'r') as f:
with open(desc_path, 'r', encoding='utf-8') as f:
project_desc = json.load(f)
return project_desc.get('debug_prefix_map_gdbinit')