From 182772455a18e6af38f0935a984f4ef1bdfc9221 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Sun, 5 Nov 2017 06:46:19 +0100 Subject: Simplify allnoconfig.py choice handling Don't need to handle them at all now that .assignable doesn't claim that choice symbols in y-mode choices can be set to n. 20/20 hindsight. --- examples/allnoconfig.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/examples/allnoconfig.py b/examples/allnoconfig.py index 3b7fd31..467f681 100644 --- a/examples/allnoconfig.py +++ b/examples/allnoconfig.py @@ -15,17 +15,16 @@ def do_allnoconfig(node): global changed # Walk the tree of menu nodes. You can imagine this as going down/into menu - # entries in the menuconfig interface, setting each to 'n' (or the lowest + # entries in the menuconfig interface, setting each to n (or the lowest # assignable value). while node is not None: if isinstance(node.item, Symbol): sym = node.item - # Is the symbol a non-choice, non-allnoconfig_y symbol that can be - # set to a lower value than its current value? - if (sym.choice is None and - not sym.is_allnoconfig_y and + # Is the symbol a non-allnoconfig_y symbol that can be set to a + # lower value than its current value? + if (not sym.is_allnoconfig_y and sym.assignable and sym.assignable[0] < sym.tri_value): -- cgit v1.2.3