diff options
| author | Yasushi SHOJI <yashi@spacecubics.com> | 2025-10-31 02:11:55 +0900 |
|---|---|---|
| committer | Torsten Tejlmand Rasmussen <torsten.rasmussen@nordicsemi.no> | 2025-11-04 14:38:55 +0100 |
| commit | 601f63d035ba355fefb69387de1a9bc5cc2201ab (patch) | |
| tree | 6413c517a8bc08a1f67c1733f67b79301614f68c | |
| parent | 6eae2bfd385fd7311aaa0f197f1a5060af5d7693 (diff) | |
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 <yashi@spacecubics.com>
| -rwxr-xr-x | guiconfig.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/guiconfig.py b/guiconfig.py index 0594ba6..45c0d9d 100755 --- a/guiconfig.py +++ b/guiconfig.py @@ -1307,7 +1307,7 @@ def _check_valid(dialog, entry, sym, s): entry.focus_set() return False - for low_sym, high_sym, cond in sym.ranges: + for low_sym, high_sym, cond, _ in sym.ranges: if expr_value(cond): low_s = low_sym.str_value high_s = high_sym.str_value @@ -1330,7 +1330,7 @@ def _range_info(sym): # 'sym', or None if 'sym' doesn't have a range if sym.type in (INT, HEX): - for low, high, cond in sym.ranges: + for low, high, cond, _ in sym.ranges: if expr_value(cond): return "Range: {}-{}".format(low.str_value, high.str_value) |
