mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-03 12:44:33 +02:00
tools: avoid using directly _write_to_conf from kconfiglib
Closes https://github.com/espressif/esp-idf/issues/3543
This commit is contained in:
@@ -349,10 +349,8 @@ def write_cmake(deprecated_options, config, filename):
|
|||||||
if not isinstance(sym, kconfiglib.Symbol):
|
if not isinstance(sym, kconfiglib.Symbol):
|
||||||
return
|
return
|
||||||
|
|
||||||
# Note: str_value calculates _write_to_conf, due to
|
if sym.config_string:
|
||||||
# internal magic in kconfiglib...
|
|
||||||
val = sym.str_value
|
val = sym.str_value
|
||||||
if sym._write_to_conf:
|
|
||||||
if sym.orig_type in (kconfiglib.BOOL, kconfiglib.TRISTATE) and val == "n":
|
if sym.orig_type in (kconfiglib.BOOL, kconfiglib.TRISTATE) and val == "n":
|
||||||
val = "" # write unset values as empty variables
|
val = "" # write unset values as empty variables
|
||||||
write("set({}{} \"{}\")\n".format(
|
write("set({}{} \"{}\")\n".format(
|
||||||
@@ -380,8 +378,8 @@ def get_json_values(config):
|
|||||||
if not isinstance(sym, kconfiglib.Symbol):
|
if not isinstance(sym, kconfiglib.Symbol):
|
||||||
return
|
return
|
||||||
|
|
||||||
val = sym.str_value # this calculates _write_to_conf, due to kconfiglib magic
|
if sym.config_string:
|
||||||
if sym._write_to_conf:
|
val = sym.str_value
|
||||||
if sym.type in [kconfiglib.BOOL, kconfiglib.TRISTATE]:
|
if sym.type in [kconfiglib.BOOL, kconfiglib.TRISTATE]:
|
||||||
val = (val != "n")
|
val = (val != "n")
|
||||||
elif sym.type == kconfiglib.HEX:
|
elif sym.type == kconfiglib.HEX:
|
||||||
|
Reference in New Issue
Block a user