From 66058f3a3d4ac3b63861d8574be753eece44779e Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Tue, 6 Feb 2018 03:05:07 +0100 Subject: Consistently use 'kconf' instead of 'conf' The examples had some leftovers from Kconfiglib 1. --- examples/allnoconfig_simpler.py | 8 ++++---- examples/defconfig.py | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'examples') diff --git a/examples/allnoconfig_simpler.py b/examples/allnoconfig_simpler.py index 81e701c..3babcab 100644 --- a/examples/allnoconfig_simpler.py +++ b/examples/allnoconfig_simpler.py @@ -9,14 +9,14 @@ from kconfiglib import Kconfig, BOOL, TRISTATE import sys -conf = Kconfig(sys.argv[1]) +kconf = Kconfig(sys.argv[1]) # Avoid warnings printed by Kconfiglib when assigning a value to a symbol that # has no prompt. Such assignments never have an effect. -conf.disable_warnings() +kconf.disable_warnings() -for sym in conf.defined_syms: +for sym in kconf.defined_syms: if sym.type in (BOOL, TRISTATE): sym.set_value(2 if sym.is_allnoconfig_y else 0) -conf.write_config(".config") +kconf.write_config(".config") diff --git a/examples/defconfig.py b/examples/defconfig.py index 236db8d..cc3f12d 100644 --- a/examples/defconfig.py +++ b/examples/defconfig.py @@ -8,15 +8,15 @@ import kconfiglib import os import sys -conf = kconfiglib.Kconfig(sys.argv[1]) +kconf = kconfiglib.Kconfig(sys.argv[1]) if os.path.exists(".config"): print("using existing .config") - conf.load_config(".config") + kconf.load_config(".config") else: - if conf.defconfig_filename is not None: - print("using " + conf.defconfig_filename) - conf.load_config(conf.defconfig_filename) + if kconf.defconfig_filename is not None: + print("using " + kconf.defconfig_filename) + kconf.load_config(kconf.defconfig_filename) -conf.write_config(".config") +kconf.write_config(".config") print("configuration written to .config") -- cgit v1.2.3