From: chenjiankun Date: Tue, 29 Nov 2016 17:02:07 +0000 (+0000) Subject: Bugfix: dict don't have startwith method error when use API to run test case X-Git-Tag: danube.1.0~203 X-Git-Url: https://gerrit.opnfv.org/gerrit/gitweb?a=commitdiff_plain;h=136684a74580fe3e891c4cbc17aab5074614b3c0;p=yardstick.git Bugfix: dict don't have startwith method error when use API to run test case JIRA: YARDSTICK-431 When use API to run test case and set the task-args args, it will encounter a error of dict object do not have startwith method. The reason is yardstick will only accept the str type. So we need to change the dict to str. Change-Id: I26aac35c477842ab9cd692bdacd401e68673b01d Signed-off-by: chenjiankun --- diff --git a/api/utils/common.py b/api/utils/common.py index 04a6fe0d6..09cfc04d4 100644 --- a/api/utils/common.py +++ b/api/utils/common.py @@ -34,7 +34,7 @@ def get_command_list(command_list, opts, args): task_args = opts.get('task-args', '') if task_args: - command_list.extend(['--task-args', task_args]) + command_list.extend(['--task-args', str(task_args)]) return command_list