Bug 1401725 - Catch HTTP 404 errors during taskgraph optimization; r?dustin
find_task_id() converts HTTP 404 to KeyError. So we need to trap
an additional exception to handle this failure.
MozReview-Commit-ID: IMHAxpT1dmt
--- a/taskcluster/taskgraph/optimize.py
+++ b/taskcluster/taskgraph/optimize.py
@@ -170,17 +170,18 @@ def optimization(name):
@optimization('index-search')
def opt_index_search(task, params, index_path):
try:
task_id = find_task_id(
index_path,
use_proxy=bool(os.environ.get('TASK_ID')))
return task_id or True
- except requests.exceptions.HTTPError:
+ # find_task_id() converts HTTP 404 to KeyError.
+ except (KeyError, requests.exceptions.HTTPError):
pass
return False
@optimization('seta')
def opt_seta(task, params):
bbb_task = False