summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2019-12-14 18:04:09 +0100
committerUlf Magnusson <ulfalizer@gmail.com>2019-12-14 18:12:07 +0100
commit1ec91703ecdb4c369212fabe2ca0a68f040b7697 (patch)
treeda0d7e8233511dd4face9d35b23add875b86e8e3 /examples
parentc2414bdf64c03470061d280a7d1b5ea97bab3185 (diff)
Add Kconfig.__init__() helper flag for suppressing tracebacks
Tools that don't use standard_kconfig() currently generate spammy tracebacks for e.g. syntax errors. Add a suppress_traceback flag to Kconfig.__init__() for catching "expected" exceptions and printing them to stderr and exiting with status 1. Use it to make all tools consistently hide tracebacks.
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/merge_config.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/merge_config.py b/examples/merge_config.py
index 528e86c..2681b63 100755
--- a/examples/merge_config.py
+++ b/examples/merge_config.py
@@ -79,7 +79,7 @@ from kconfiglib import Kconfig, BOOL, TRISTATE, TRI_TO_STR
if len(sys.argv) < 4:
sys.exit("usage: merge_config.py Kconfig merged_config config1 [config2 ...]")
-kconf = Kconfig(sys.argv[1])
+kconf = Kconfig(sys.argv[1], suppress_traceback=True)
# Enable warnings for assignments to undefined symbols
kconf.warn_assign_undef = True