summaryrefslogtreecommitdiff
path: root/buildstream/_frontend/main.py
diff options
context:
space:
mode:
Diffstat (limited to 'buildstream/_frontend/main.py')
-rw-r--r--buildstream/_frontend/main.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/buildstream/_frontend/main.py b/buildstream/_frontend/main.py
index e6f365de2..1b6c46239 100644
--- a/buildstream/_frontend/main.py
+++ b/buildstream/_frontend/main.py
@@ -481,7 +481,7 @@ def prefix_choice_value_proc(choices):
def value_proc(user_input):
remaining_candidate = [choice for choice in choices if choice.startswith(user_input)]
- if len(remaining_candidate) == 0:
+ if not remaining_candidate:
raise UsageError("Expected one of {}, got {}".format(choices, user_input))
elif len(remaining_candidate) == 1:
return remaining_candidate[0]