Bug 1401183: raise KeyError from list_artifacts when none is found; r=glandium

MozReview-Commit-ID: TqON8joEd6
This commit is contained in:
Dustin J. Mitchell
2017-09-14 23:30:58 +00:00
parent a1d5721f0c
commit 0e03f5201d

View File

@@ -83,7 +83,12 @@ def get_index_url(index_path, use_proxy=False):
def find_task_id(index_path, use_proxy=False):
response = _do_request(get_index_url(index_path, use_proxy))
try:
response = _do_request(get_index_url(index_path, use_proxy))
except requests.exceptions.HTTPError as e:
if e.response.status_code == 404:
raise KeyError("index path {} not found".format(index_path))
raise
return response.json()['taskId']