Skip to content

Commit 601f63d

Browse files
yashitejlmand
authored andcommitted
scripts: kconfig: gnuconfig: Ignore loc
The commit 125d0daaa17aa added 'loc' to the sym.ranges tuples and fixed kconfiglib.py but guiconfig.py is left untouched. This make menuconfig to die with: Exception in Tkinter callback Traceback (most recent call last): File "/usr/lib/python3.13/tkinter/__init__.py", line 2077, in __call__ return self.func(*args) ~~~~~~~~~^^^^^^^ File ".../scripts/kconfig/guiconfig.py", line 917, in _tree_double_click return _tree_enter(event) File ".../scripts/kconfig/guiconfig.py", line 942, in _tree_enter _change_node(node, tree.winfo_toplevel()) ~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File ".../scripts/kconfig/guiconfig.py", line 1125, in _change_node s = _set_val_dialog(node, parent) File ".../scripts/kconfig/guiconfig.py", line 1219, in _set_val_dialog range_info = _range_info(sym) File ".../scripts/kconfig/guiconfig.py", line 1339, 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 6eae2bf commit 601f63d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

guiconfig.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1307,7 +1307,7 @@ def _check_valid(dialog, entry, sym, s):
13071307
entry.focus_set()
13081308
return False
13091309

1310-
for low_sym, high_sym, cond in sym.ranges:
1310+
for low_sym, high_sym, cond, _ in sym.ranges:
13111311
if expr_value(cond):
13121312
low_s = low_sym.str_value
13131313
high_s = high_sym.str_value
@@ -1330,7 +1330,7 @@ def _range_info(sym):
13301330
# 'sym', or None if 'sym' doesn't have a range
13311331

13321332
if sym.type in (INT, HEX):
1333-
for low, high, cond in sym.ranges:
1333+
for low, high, cond, _ in sym.ranges:
13341334
if expr_value(cond):
13351335
return "Range: {}-{}".format(low.str_value, high.str_value)
13361336

0 commit comments

Comments
 (0)