diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2015-06-12 01:49:53 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2015-06-12 04:10:13 +0200 |
| commit | 76f495a796fdc6663d2631df7f28c9edeea736fc (patch) | |
| tree | 728ff577c6e6e0d6176ba67bd4a6afe4338c43a4 | |
| parent | 0f2ef4ef220124c6088c55cb774080112ecee694 (diff) | |
Move assignment to 'write_to_conf' to later.
It's always False for symbols with UNKNOWN type, so no need to re-set
it.
Add a comment too.
| -rw-r--r-- | kconfiglib.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/kconfiglib.py b/kconfiglib.py index 7dbfc60..f259b0a 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -1850,8 +1850,6 @@ class Symbol(Item): if self.cached_val is not None: return self.cached_val - self.write_to_conf = False - # As a quirk of Kconfig, undefined symbols get their name as their # value. This is why things like "FOO = bar" work for seeing if FOO has # the value "bar". @@ -1860,9 +1858,11 @@ class Symbol(Item): return self.name new_val = default_value[self.type] - vis = _get_visibility(self) + # This is easiest to calculate together with the value + self.write_to_conf = False + if self.type == BOOL or self.type == TRISTATE: # The visibility and mode (modules-only or single-selection) of # choice items will be taken into account in _get_visibility() |
