From d0ebcc592c74995957f3b7f46408fb3a528142f4 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Thu, 27 Sep 2018 18:51:07 +0200 Subject: Simplify the defconfig and eval_expr examples a bit Style nits. --- examples/defconfig.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'examples/defconfig.py') diff --git a/examples/defconfig.py b/examples/defconfig.py index cc3f12d..a8abbe6 100644 --- a/examples/defconfig.py +++ b/examples/defconfig.py @@ -13,10 +13,9 @@ kconf = kconfiglib.Kconfig(sys.argv[1]) if os.path.exists(".config"): print("using existing .config") kconf.load_config(".config") -else: - if kconf.defconfig_filename is not None: - print("using " + kconf.defconfig_filename) - kconf.load_config(kconf.defconfig_filename) +elif kconf.defconfig_filename is not None: + print("using " + kconf.defconfig_filename) + kconf.load_config(kconf.defconfig_filename) kconf.write_config(".config") print("configuration written to .config") -- cgit v1.2.3