From f9b158ebb3d81c923461981d2b087989c284c2d4 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Wed, 30 May 2018 21:18:49 +0200 Subject: Add tool helper for loading/saving .config files Removes repeated KCONFIG_CONFIG boilerplate. Also make allyesconfig use KCONFIG_CONFIG when writing (oversight), and document the sys.exit() behavior for standard_kconfig(). --- menuconfig.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'menuconfig.py') diff --git a/menuconfig.py b/menuconfig.py index 584bf8e..ff27d17 100755 --- a/menuconfig.py +++ b/menuconfig.py @@ -96,7 +96,7 @@ from kconfiglib import Kconfig, \ AND, OR, NOT, \ expr_value, split_expr, \ TRI_TO_STR, TYPE_TO_STR, \ - standard_kconfig + standard_kconfig, standard_config_filename # @@ -299,10 +299,7 @@ def menuconfig(kconf): global _conf_changed - _config_filename = os.environ.get("KCONFIG_CONFIG") - if _config_filename is None: - _config_filename = ".config" - + _config_filename = standard_config_filename() if os.path.exists(_config_filename): _conf_changed = False -- cgit v1.2.3