From 9a429a9abc1de8c431b42244be6e440d122c2686 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Sun, 18 Nov 2018 17:16:37 +0100 Subject: menuconfig: Tighten up _shown_nodes() a bit Move the addition of the visible child nodes and use += instead of extend(). --- menuconfig.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'menuconfig.py') 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 -- cgit v1.2.3