From 8ddc0df484a25f915591c5bee6f4a9e4e71207d5 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Thu, 11 Apr 2019 22:26:23 +0200 Subject: menuconfig: Simplify _menu_path_info() --- menuconfig.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/menuconfig.py b/menuconfig.py index e2120a1..1c5e4b2 100755 --- a/menuconfig.py +++ b/menuconfig.py @@ -2731,14 +2731,14 @@ def _menu_path_info(node): path = "" - node = node.parent - while node is not _kconf.top_node: + while node.parent is not _kconf.top_node: + node = node.parent + # Promptless choices might appear among the parents. Use # standard_sc_expr_str() for them, so that they show up as # ''. path = " -> " + (node.prompt[0] if node.prompt else standard_sc_expr_str(node.item)) + path - node = node.parent return "(top menu)" + path -- cgit v1.2.3