Merge "Fix adding right deb repo based on the distro we are running on"
[yardstick.git] / api / resources / v2 / tasks.py
index 9790d76..885a190 100644 (file)
@@ -1,3 +1,11 @@
+##############################################################################
+# Copyright (c) 2017 Huawei Technologies Co.,Ltd.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
 import uuid
 import logging
 from datetime import datetime
@@ -106,7 +114,8 @@ class V2Task(ApiResource):
 
         if project.tasks:
             LOG.info('update tasks in project')
-            new_task_list = project.tasks.split(',').remove(task_id)
+            new_task_list = project.tasks.split(',')
+            new_task_list.remove(task_id)
             if new_task_list:
                 new_tasks = ','.join(new_task_list)
             else: