From 4b6c899f39cb7553ebd52ff400b9a080eca3532b Mon Sep 17 00:00:00 2001 From: Nicolas Dandrimont Date: Thu, 20 Oct 2016 15:23:25 +0200 Subject: [PATCH] base: the scheduler API returns dicts, not lists --- swh/lister/github/base.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/swh/lister/github/base.py b/swh/lister/github/base.py index ac2fbd9..fdf99a0 100644 --- a/swh/lister/github/base.py +++ b/swh/lister/github/base.py @@ -56,8 +56,7 @@ class SWHLister(config.SWHConfig): a list of task ids """ returned_tasks = self.scheduler.create_tasks(tasks) - id_index = self.scheduler.task_keys.index('id') - return [returned_task[id_index] for returned_task in returned_tasks] + return [returned_task['id'] for returned_task in returned_tasks] def disable_tasks(self, task_ids): """Disable the tasks identified by the given ids"""