diff options
| author | Yasushi SHOJI <yashi@spacecubics.com> | 2025-10-31 02:09:50 +0900 |
|---|---|---|
| committer | Torsten Tejlmand Rasmussen <torsten.rasmussen@nordicsemi.no> | 2025-11-04 14:38:55 +0100 |
| commit | 6eae2bfd385fd7311aaa0f197f1a5060af5d7693 (patch) | |
| tree | 17f84a0fb270b8c964ab2b818651a1f63fb8c64c | |
| parent | 9b1ae7845300bf248cf5ba71837791eb2141f195 (diff) | |
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 <yashi@spacecubics.com>
| -rwxr-xr-x | menuconfig.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/menuconfig.py b/menuconfig.py index 9c5732a..178fbc1 100755 --- a/menuconfig.py +++ b/menuconfig.py @@ -3108,7 +3108,7 @@ def _check_valid(sym, s): .format(s, TYPE_TO_STR[sym.orig_type])) 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 @@ -3128,7 +3128,7 @@ def _range_info(sym): # 'sym', or None if 'sym' doesn't have a range if sym.orig_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) |
