Merge branch 'bugfix/kconfiglib_open_encoding_v4.0' into 'release/v4.0'
tools: Avoid Unicode error in kconfiglib while opening files See merge request espressif/esp-idf!8082
This commit is contained in:
commit
0b822a9ec7
1 changed files with 1 additions and 1 deletions
|
@ -1125,7 +1125,7 @@ class Kconfig(object):
|
|||
was set when the configuration was loaded.
|
||||
"""
|
||||
try:
|
||||
return open(filename)
|
||||
return open(filename) if sys.version_info[0] < 3 else open(filename, encoding='utf-8')
|
||||
except IOError as e:
|
||||
if not os.path.isabs(filename) and self.srctree is not None:
|
||||
filename = os.path.join(self.srctree, filename)
|
||||
|
|
Loading…
Reference in a new issue