From 791b930930b9ddcb752c97c8a8ef859b7afbeb0e Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Wed, 30 May 2018 20:19:08 +0200 Subject: Add tool helper for selecting the top-level Kconfig standard_kconfig() gets the top-level Kconfig file from the first command-line argument, defaulting to "Kconfig". This removes some boilerplate from tools. --- allyesconfig.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'allyesconfig.py') diff --git a/allyesconfig.py b/allyesconfig.py index e405e3d..a0eb01d 100755 --- a/allyesconfig.py +++ b/allyesconfig.py @@ -32,10 +32,7 @@ import sys import kconfiglib def main(): - if len(sys.argv) > 2: - sys.exit("usage: {} [Kconfig]".format(sys.argv[0])) - - kconf = kconfiglib.Kconfig("Kconfig" if len(sys.argv) < 2 else sys.argv[1]) + kconf = kconfiglib.standard_kconfig() # Avoid warnings printed by Kconfiglib when assigning a value to a symbol that # has no prompt. Such assignments never have an effect. -- cgit v1.2.3