1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #15594 from leandrolanzieri/pr/tools/kconfig_fix_range_cond_print

dist/tools/kconfig/genconfig: fix printing of range condition
This commit is contained in:
Alexandre Abadie 2020-12-09 12:41:15 +01:00 committed by GitHub
commit 57de2c0cea
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -293,8 +293,10 @@ def get_sym_applying_range(sym):
(low, high, cond) = rng
# get the first active one
if kconfiglib.expr_value(cond):
return (low.str_value, high.str_value,
"(if {})".format(cond.name) if not cond.is_constant else "")
cond_str = ""
if cond is not sym.kconfig.y:
cond_str = "if {}".format(kconfiglib.expr_str(cond))
return (low.str_value, high.str_value, cond_str)
return None