diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2018-05-30 21:18:49 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2018-05-30 21:40:27 +0200 |
| commit | f9b158ebb3d81c923461981d2b087989c284c2d4 (patch) | |
| tree | 0720a09a931c0a241bb444077708389fa7efc035 /oldconfig.py | |
| parent | 791b930930b9ddcb752c97c8a8ef859b7afbeb0e (diff) | |
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().
Diffstat (limited to 'oldconfig.py')
| -rwxr-xr-x | oldconfig.py | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/oldconfig.py b/oldconfig.py index 70a3f5f..546da02 100755 --- a/oldconfig.py +++ b/oldconfig.py @@ -101,7 +101,7 @@ # Configuration written to .config from __future__ import print_function from kconfiglib import Kconfig, Symbol, Choice, BOOL, TRISTATE, HEX, \ - standard_kconfig + standard_kconfig, standard_config_filename import os import sys @@ -302,10 +302,7 @@ def do_oldconfig_for_node(node): def main(): kconf = standard_kconfig() - config_filename = os.environ.get("KCONFIG_CONFIG") - if config_filename is None: - config_filename = ".config" - + config_filename = standard_config_filename() if not os.path.exists(config_filename): sys.exit("{}: '{}' does not exist" .format(sys.argv[0], config_filename)) |
