def _get_default_tasks(self): """ Get a list of default task names (@task(default=True)). :return: List containing default task names. :rtype: list """ if 'default' in HerringTasks.keys(): return ['default'] return []
def _verified_tasks(self, task_list): """ If a given task does not exist, then raise a ValueError exception. :return: None :raises ValueError: """ if not task_list: task_list = self._get_default_tasks() if not task_list: raise ValueError("No tasks given") task_names = HerringTasks.keys() return [name for name in task_list if name in task_names]