diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2017-09-29 00:31:56 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2017-09-29 05:53:17 +0200 |
| commit | e7c6c7a5f5ca20844cf23655a4a37fa7ccd6fc8f (patch) | |
| tree | d84fc72c7c062e367751f05dee76e7f0b19c44f0 | |
| parent | 30cdddbdb48ffa0562d740bb7d0d78aedc98a96c (diff) | |
_get_visibility() choice clarification nit
| -rw-r--r-- | kconfiglib.py | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/kconfiglib.py b/kconfiglib.py index a78f73b..21e978f 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -3304,18 +3304,19 @@ def _get_visibility(sc): vis = sc._config._eval_max(vis, cond_expr) if isinstance(sc, Symbol) and sc._is_choice_sym: - if sc._parent._type == TRISTATE and sc._type != TRISTATE and \ - sc._parent.get_mode() != "y": + choice = sc._parent + if choice._type == TRISTATE and sc._type != TRISTATE and \ + choice.get_mode() != "y": # Non-tristate choice symbols in tristate choices depend on the # choice being in mode "y" vis = "n" elif sc._type == TRISTATE and vis == "m" and \ - sc._parent.get_mode() == "y": + choice.get_mode() == "y": # Choice symbols with visibility "m" are not visible if the # choice has mode "y" vis = "n" else: - vis = sc._config._eval_min(vis, _get_visibility(sc._parent)) + vis = sc._config._eval_min(vis, _get_visibility(choice)) # Promote "m" to "y" if we're dealing with a non-tristate if vis == "m" and sc._type != TRISTATE: |
