Skip to content

Commit 090d294

Browse files
yashinashif
authored andcommitted
scripts: kconfig: menuconfig: Ignore loc
The commit 125d0da added 'loc' to the sym.ranges tuples and fixed kconfiglib.py but menuconfig.py is left untouched. This make menuconfig to die with: Traceback (most recent call last): File ".../scripts/kconfig/menuconfig.py", line 3284, in <module> _main() ~~~~~^^ File ".../scripts/kconfig/menuconfig.py", line 663, in _main menuconfig(standard_kconfig(__doc__)) ~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^ File ".../scripts/kconfig/menuconfig.py", line 732, in menuconfig print(curses.wrapper(_menuconfig)) ~~~~~~~~~~~~~~^^^^^^^^^^^^^ File "/usr/lib/python3.13/curses/__init__.py", line 94, in wrapper return func(stdscr, *args, **kwds) File ".../scripts/kconfig/menuconfig.py", line 872, in _menuconfig _change_node(sel_node) ~~~~~~~~~~~~^^^^^^^^^^ File ".../scripts/kconfig/menuconfig.py", line 1586, in _change_node s, _range_info(sc)) ~~~~~~~~~~~^^^^ File ".../scripts/kconfig/menuconfig.py", line 3119, in _range_info for low, high, cond in sym.ranges: ^^^^^^^^^^^^^^^ ValueError: too many values to unpack (expected 3) This commit ignores the last element in the tuples. Signed-off-by: Yasushi SHOJI <yashi@spacecubics.com>
1 parent 8fa6a3a commit 090d294

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

scripts/kconfig/menuconfig.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3096,7 +3096,7 @@ def _check_valid(sym, s):
30963096
.format(s, TYPE_TO_STR[sym.orig_type]))
30973097
return False
30983098

3099-
for low_sym, high_sym, cond in sym.ranges:
3099+
for low_sym, high_sym, cond, _ in sym.ranges:
31003100
if expr_value(cond):
31013101
low_s = low_sym.str_value
31023102
high_s = high_sym.str_value
@@ -3116,7 +3116,7 @@ def _range_info(sym):
31163116
# 'sym', or None if 'sym' doesn't have a range
31173117

31183118
if sym.orig_type in (INT, HEX):
3119-
for low, high, cond in sym.ranges:
3119+
for low, high, cond, _ in sym.ranges:
31203120
if expr_value(cond):
31213121
return "Range: {}-{}".format(low.str_value, high.str_value)
31223122

0 commit comments

Comments
 (0)