summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2018-11-18 17:16:37 +0100
committerUlf Magnusson <ulfalizer@gmail.com>2018-11-18 18:58:16 +0100
commit9a429a9abc1de8c431b42244be6e440d122c2686 (patch)
tree5e7ad49a1a1f971fb54f7e0a80ea616bdb509e3a
parentf5fd57c49ab7d858511de696409830ae53f85be7 (diff)
menuconfig: Tighten up _shown_nodes() a bit
Move the addition of the visible child nodes and use += instead of extend().
-rwxr-xr-xmenuconfig.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/menuconfig.py b/menuconfig.py
index 448789e..f8e5d5c 100755
--- a/menuconfig.py
+++ b/menuconfig.py
@@ -1385,13 +1385,12 @@ def _shown_nodes(menu):
rec(node.list) if node.list and not node.is_menuconfig else []
# Always show the node if it is the root of an implicit submenu
- # with visible items, even when the node itself is invisible. This
+ # with visible items, even if the node itself is invisible. This
# can happen e.g. if the symbol has an optional prompt
# ('prompt "foo" if COND') that is currently invisible.
if shown(node) or shown_children:
res.append(node)
-
- res.extend(shown_children)
+ res += shown_children
node = node.next