From dd89d35a74e438cf67ceb3efacdeb651bfd2fa5e Mon Sep 17 00:00:00 2001 From: "Dustin J. Mitchell" Date: Thu, 5 Jul 2018 16:51:57 +0000 Subject: [PATCH] Bug 1473636: raise errors in cancel-all action; r=tomprince This changes File "/builds/worker/checkouts/gecko/taskcluster/taskgraph/actions/cancel_all.py", line 30, in list_group for task in [t['status'] for t in response['tasks']]: KeyError: u'tasks' Into a more understandable error (404, in this case). MozReview-Commit-ID: 5XnFyxIdRfo --HG-- extra : rebase_source : 797a3117d3246c962f30980c1658fde3bd366135 --- taskcluster/taskgraph/actions/cancel_all.py | 1 + 1 file changed, 1 insertion(+) diff --git a/taskcluster/taskgraph/actions/cancel_all.py b/taskcluster/taskgraph/actions/cancel_all.py index 8a5414f92970..fb698894be7f 100644 --- a/taskcluster/taskgraph/actions/cancel_all.py +++ b/taskcluster/taskgraph/actions/cancel_all.py @@ -26,6 +26,7 @@ def list_group(task_group_id, session): while True: url = base_url.format('task-group/{}/list'.format(task_group_id)) response = session.get(url, stream=True, params=params) + response.raise_for_status() response = response.json() for task in [t['status'] for t in response['tasks']]: if task['state'] in ['running', 'pending', 'unscheduled']: