From c6c21b2455a8ffc20c8fb5b4bedbd9a2d2eb7dab Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Wed, 12 Dec 2012 11:16:11 +0100 Subject: Re-enable set_user_value() warning for symbols with no prompts. Disable warnings in allnoconfig_simpler.py instead. --- examples/allnoconfig_simpler.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'examples') diff --git a/examples/allnoconfig_simpler.py b/examples/allnoconfig_simpler.py index affa004..f8f2a2c 100644 --- a/examples/allnoconfig_simpler.py +++ b/examples/allnoconfig_simpler.py @@ -16,6 +16,11 @@ import sys conf = kconfiglib.Config(sys.argv[1]) +# Avoid warnings printed by Kconfiglib when assigning a user value with +# set_user_value() to a symbol that has no prompt (such assignments never have +# an effect) +conf.set_print_warnings(False) + for sym in conf: if sym.get_type() in (kconfiglib.BOOL, kconfiglib.TRISTATE): sym.set_user_value("n") -- cgit v1.2.3