Skip to content

Commit 6eae2bf

Browse files
yashitejlmand
authored andcommitted
scripts: kconfig: menuconfig: Ignore loc
The commit 125d0daaa17aa 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 <[email protected]>
1 parent 9b1ae78 commit 6eae2bf

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

menuconfig.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3108,7 +3108,7 @@ def _check_valid(sym, s):
31083108
.format(s, TYPE_TO_STR[sym.orig_type]))
31093109
return False
31103110

3111-
for low_sym, high_sym, cond in sym.ranges:
3111+
for low_sym, high_sym, cond, _ in sym.ranges:
31123112
if expr_value(cond):
31133113
low_s = low_sym.str_value
31143114
high_s = high_sym.str_value
@@ -3128,7 +3128,7 @@ def _range_info(sym):
31283128
# 'sym', or None if 'sym' doesn't have a range
31293129

31303130
if sym.orig_type in (INT, HEX):
3131-
for low, high, cond in sym.ranges:
3131+
for low, high, cond, _ in sym.ranges:
31323132
if expr_value(cond):
31333133
return "Range: {}-{}".format(low.str_value, high.str_value)
31343134

0 commit comments

Comments
 (0)