From 5104b1be4331c6b04b3aec0eab763d7dd1b2768b Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Tue, 22 May 2018 11:35:46 +0200 Subject: menuconfig: Rearrange symbol name printing condition The name is always shown for items without prompts (which are always promptless symbols). Only show-name mode needs the symbol/choice check. --- menuconfig.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/menuconfig.py b/menuconfig.py index be8c3d5..77b9d07 100755 --- a/menuconfig.py +++ b/menuconfig.py @@ -2180,9 +2180,10 @@ def _node_str(node): s = "{:{}}".format(_value_str(node), 3 + indent) # 'not node.prompt' can only be True in show-all mode - if (not node.prompt or _show_name) and \ - (isinstance(node.item, Symbol) or - (isinstance(node.item, Choice) and node.item.name)): + if not node.prompt or \ + (_show_name and + (isinstance(node.item, Symbol) or + (isinstance(node.item, Choice) and node.item.name))): s += " <{}>".format(node.item.name) -- cgit v1.2.3