From 7aef1232d85e9de25e070c7b4102df7b86a00703 Mon Sep 17 00:00:00 2001 From: Mike Bonnet Date: Mar 18 2016 20:47:33 +0000 Subject: remove use of dict comprehensions to retain python 2.6 support Dict comprehensions (PEP-274) were added to python 2.7+. The patch that added the --mine option to list-tasks made use of a dict comprehension, which broke python 2.6 support. This patch restores the older dict() + list comprehension approach, which restores support for python 2.6. --- diff --git a/cli/koji b/cli/koji index 8c63e2a..437ac44 100755 --- a/cli/koji +++ b/cli/koji @@ -5855,7 +5855,7 @@ def _list_tasks(options, session): qopts = {'order' : 'priority,create_time'} tasklist = session.listTasks(callopts, qopts) - tasks = {x['id']:x for x in tasklist} + tasks = dict([(x['id'], x) for x in tasklist]) #thread the tasks for t in tasklist: