зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
1ad6b152e7
Коммит
dd89d35a74
|
@ -26,6 +26,7 @@ def list_group(task_group_id, session):
|
||||||
while True:
|
while True:
|
||||||
url = base_url.format('task-group/{}/list'.format(task_group_id))
|
url = base_url.format('task-group/{}/list'.format(task_group_id))
|
||||||
response = session.get(url, stream=True, params=params)
|
response = session.get(url, stream=True, params=params)
|
||||||
|
response.raise_for_status()
|
||||||
response = response.json()
|
response = response.json()
|
||||||
for task in [t['status'] for t in response['tasks']]:
|
for task in [t['status'] for t in response['tasks']]:
|
||||||
if task['state'] in ['running', 'pending', 'unscheduled']:
|
if task['state'] in ['running', 'pending', 'unscheduled']:
|
||||||
|
|
Загрузка…
Ссылка в новой задаче