diff options
Diffstat (limited to 'yardstick/benchmark/core/task.py')
-rw-r--r-- | yardstick/benchmark/core/task.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/yardstick/benchmark/core/task.py b/yardstick/benchmark/core/task.py index af5b70566..0e85e6316 100644 --- a/yardstick/benchmark/core/task.py +++ b/yardstick/benchmark/core/task.py @@ -371,17 +371,17 @@ class TaskParser(object): # pragma: no cover tc_fit_installer = constraint.get('installer', None) LOG.info("cur_pod:%s, cur_installer:%s,tc_constraints:%s", cur_pod, cur_installer, constraint) - if cur_pod and tc_fit_pod and cur_pod not in tc_fit_pod: + if (cur_pod is None) or (tc_fit_pod and cur_pod not in tc_fit_pod): return False - if cur_installer and tc_fit_installer and \ - cur_installer not in tc_fit_installer: + if (cur_installer is None) or (tc_fit_installer and cur_installer + not in tc_fit_installer): return False return True def _get_task_para(self, task, cur_pod): task_args = task.get('task_args', None) if task_args is not None: - task_args = task_args.get(cur_pod, None) + task_args = task_args.get(cur_pod, task_args.get('default')) task_args_fnames = task.get('task_args_fnames', None) if task_args_fnames is not None: task_args_fnames = task_args_fnames.get(cur_pod, None) |