mirror of
https://github.com/espressif/esp-idf
synced 2025-03-10 01:29:21 -04:00
Merge branch 'bugfix/confgen_avoid_write_to_conf' into 'master'
tools: avoid using directly _write_to_conf from Kconfiglib Closes IDFGH-1246 See merge request espressif/esp-idf!5423
This commit is contained in:
commit
cd89182458
@ -349,10 +349,8 @@ def write_cmake(deprecated_options, config, filename):
|
||||
if not isinstance(sym, kconfiglib.Symbol):
|
||||
return
|
||||
|
||||
# Note: str_value calculates _write_to_conf, due to
|
||||
# internal magic in kconfiglib...
|
||||
if sym.config_string:
|
||||
val = sym.str_value
|
||||
if sym._write_to_conf:
|
||||
if sym.orig_type in (kconfiglib.BOOL, kconfiglib.TRISTATE) and val == "n":
|
||||
val = "" # write unset values as empty variables
|
||||
write("set({}{} \"{}\")\n".format(
|
||||
@ -380,8 +378,8 @@ def get_json_values(config):
|
||||
if not isinstance(sym, kconfiglib.Symbol):
|
||||
return
|
||||
|
||||
val = sym.str_value # this calculates _write_to_conf, due to kconfiglib magic
|
||||
if sym._write_to_conf:
|
||||
if sym.config_string:
|
||||
val = sym.str_value
|
||||
if sym.type in [kconfiglib.BOOL, kconfiglib.TRISTATE]:
|
||||
val = (val != "n")
|
||||
elif sym.type == kconfiglib.HEX:
|
||||
|
Loading…
x
Reference in New Issue
Block a user