Bugfix: dict don't have startwith method error when use API to run test case 67/25167/1
authorchenjiankun <chenjiankun1@huawei.com>
Tue, 29 Nov 2016 17:02:07 +0000 (17:02 +0000)
committerchenjiankun <chenjiankun1@huawei.com>
Tue, 29 Nov 2016 17:02:07 +0000 (17:02 +0000)
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 <chenjiankun1@huawei.com>
api/utils/common.py

index 04a6fe0..09cfc04 100644 (file)
@@ -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