diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2018-02-09 00:31:50 +0100 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2018-02-09 00:50:03 +0100 |
| commit | 0d44b9e2f47a5a993ab44a1c5355c2ae245d4525 (patch) | |
| tree | 86204797ff123b17e34e1dd5ddbd1e05e49fc717 /kconfiglib.py | |
| parent | 3c4e9ad328e168c524276f21b24ae7e87fbb912a (diff) | |
Simplify visibility check in Choice._get_selection()
The visibility of a symbol in an y-mode choice can only be n or y, so
it's sufficient to check that it's not n (0).
Diffstat (limited to 'kconfiglib.py')
| -rw-r--r-- | kconfiglib.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kconfiglib.py b/kconfiglib.py index 0e19957..eaa9af8 100644 --- a/kconfiglib.py +++ b/kconfiglib.py @@ -3472,10 +3472,11 @@ class Choice(object): # Warning: See Symbol._rec_invalidate(), and note that this is a hidden # function call (property magic) if self.tri_value != 2: + # Not in y mode, so no selection return None # Use the user selection if it's visible - if self.user_selection and self.user_selection.visibility == 2: + if self.user_selection and self.user_selection.visibility: return self.user_selection # Otherwise, check if we have a default |
