summaryrefslogtreecommitdiff
path: root/kconfiglib.py
diff options
context:
space:
mode:
authorUlf Magnusson <ulfalizer@gmail.com>2018-02-09 00:31:50 +0100
committerUlf Magnusson <ulfalizer@gmail.com>2018-02-09 00:50:03 +0100
commit0d44b9e2f47a5a993ab44a1c5355c2ae245d4525 (patch)
tree86204797ff123b17e34e1dd5ddbd1e05e49fc717 /kconfiglib.py
parent3c4e9ad328e168c524276f21b24ae7e87fbb912a (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.py3
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