summaryrefslogtreecommitdiff
path: root/examples/allnoconfig_simpler.py
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2012-12-12 11:16:11 +0100
committerUlf Magnusson <ulfalizer@gmail.com>2012-12-12 11:16:11 +0100
commitc6c21b2455a8ffc20c8fb5b4bedbd9a2d2eb7dab (patch)
tree3a08b0207cbdc46483c0365df2402cd66d323390 /examples/allnoconfig_simpler.py
parent2f26f5c2e68a804a5f7f24482a46bf254c1120a2 (diff)
Re-enable set_user_value() warning for symbols with no prompts.
Disable warnings in allnoconfig_simpler.py instead.
Diffstat (limited to 'examples/allnoconfig_simpler.py')
-rw-r--r--examples/allnoconfig_simpler.py5
1 files changed, 5 insertions, 0 deletions
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")