1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

dist/tools/kconfig/genconfig: fix printing of range condition

This commit is contained in:
Leandro Lanzieri 2020-12-09 09:30:39 +01:00
parent 3f9e8c8ffb
commit ddf78bae22
No known key found for this signature in database
GPG Key ID: F4E9A721761C7593

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