From 64600b307d74180837b23ee4e20a777a352feeee Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Fri, 24 Aug 2018 01:45:01 +0200 Subject: menuconfig: Hide the include path for top-level items Came out as "Included via " for items in the top-level Kconfig file, which looks broken. --- menuconfig.py | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'menuconfig.py') diff --git a/menuconfig.py b/menuconfig.py index 8c575b5..fd34eb7 100755 --- a/menuconfig.py +++ b/menuconfig.py @@ -2086,7 +2086,7 @@ def _kconfig_def_info(item): for node in nodes: s += "\n\n" \ "At {}:{}\n" \ - "Included via {}\n" \ + "{}" \ "Menu path: {}\n\n" \ "{}" \ .format(node.filename, node.linenr, @@ -2097,8 +2097,13 @@ def _kconfig_def_info(item): return s def _include_path_info(node): - return " -> ".join("{}:{}".format(filename, linenr) - for filename, linenr in node.include_path) + if not node.include_path: + # In the top-level Kconfig file + return "" + + return "Included via {}\n".format( + " -> ".join("{}:{}".format(filename, linenr) + for filename, linenr in node.include_path)) def _menu_path_info(node): # Returns a string describing the menu path leading up to 'node' -- cgit v1.2.3