Commit 7f557daa authored by haileyschoelkopf's avatar haileyschoelkopf
Browse files

raise ValueError when invalid task passed

parent 328f0e85
...@@ -94,10 +94,10 @@ class MultiChoice: ...@@ -94,10 +94,10 @@ class MultiChoice:
def __contains__(self, values): def __contains__(self, values):
for value in values.split(","): for value in values.split(","):
if len(fnmatch.filter(self.choices, value)) == 0: if len(fnmatch.filter(self.choices, value)) == 0:
eval_logger.warning("{} is not in task list.".format(value))
eval_logger.info(f"Available tasks to choose:") eval_logger.info(f"Available tasks to choose:")
for choice in self.choices: for choice in self.choices:
eval_logger.info(f" - {choice}") eval_logger.info(f" - {choice}")
raise ValueError("'{}' is not in task list".format(value))
return True return True
def __iter__(self): def __iter__(self):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment