mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-24 05:11:16 +00:00
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
This commit is contained in:
parent
1ad6b152e7
commit
dd89d35a74
@ -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']:
|
||||
|
Loading…
Reference in New Issue
Block a user