diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2017-11-06 03:34:35 +0100 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2017-11-06 03:34:35 +0100 |
| commit | de6e57ff6dd4bab3d2a78f8d01b2bfecbd663fc4 (patch) | |
| tree | 1fc82d0a74e266efd7351e24c1a92d8bdc4e6eb6 /examples/allnoconfig.py | |
| parent | 6a98484bab8b5528d0915b5cf67ab00bbd461348 (diff) | |
Simplify allyesconfig.py
Can be implemented in a simpler/better way with Choice.assignable.
Also rename 'conf' to 'kconf' in allnoconfig.py for consistency.
Diffstat (limited to 'examples/allnoconfig.py')
| -rw-r--r-- | examples/allnoconfig.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/examples/allnoconfig.py b/examples/allnoconfig.py index 47a8026..127c60d 100644 --- a/examples/allnoconfig.py +++ b/examples/allnoconfig.py @@ -38,10 +38,11 @@ def do_allnoconfig(node): node = node.next -conf = Kconfig(sys.argv[1]) +# Parse the Kconfig files +kconf = Kconfig(sys.argv[1]) -# Do an initial pass to set 'option allnoconfig_y' symbols to 'y' -for sym in conf.defined_syms: +# Do an initial pass to set 'option allnoconfig_y' symbols to y +for sym in kconf.defined_syms: if sym.is_allnoconfig_y: sym.set_value(2) @@ -52,10 +53,10 @@ while 1: # until we're no longer able to change the value of any symbol in a pass. changed = False - do_allnoconfig(conf.top_node) + do_allnoconfig(kconf.top_node) # Did the pass change any symbols? if not changed: break -conf.write_config(".config") +kconf.write_config(".config") |
