diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2017-11-06 03:46:41 +0100 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2017-11-06 03:58:04 +0100 |
| commit | dccbad534a1ffe688d45810faf986ff79a0f3a41 (patch) | |
| tree | 271ee08edfa561cd0d767387f2c1d3e059bffd0e /examples/eval_expr.py | |
| parent | de6e57ff6dd4bab3d2a78f8d01b2bfecbd663fc4 (diff) | |
Clean up examples a bit
conf -> kconf, for consistency, plus various nits.
Diffstat (limited to 'examples/eval_expr.py')
| -rw-r--r-- | examples/eval_expr.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/eval_expr.py b/examples/eval_expr.py index 260edbe..36a7e6a 100644 --- a/examples/eval_expr.py +++ b/examples/eval_expr.py @@ -13,10 +13,12 @@ if len(sys.argv) < 3: print('Pass symbol name (without "CONFIG_" prefix) with SCRIPT_ARG=NAME') sys.exit(1) -conf = kconfiglib.Kconfig(sys.argv[1]) +expr = sys.argv[2] + +kconf = kconfiglib.Kconfig(sys.argv[1]) # Enable modules so that m doesn't get demoted to n -conf.syms["MODULES"].set_value(2) +kconf.syms["MODULES"].set_value(2) print("the expression '{}' evaluates to {}" - .format(sys.argv[2], conf.eval_string(sys.argv[2]))) + .format(expr, kconf.eval_string(expr))) |
