Bug 1297585 - Modify parameters for buildUrl to satisfy taskcluster changes. r=glandium

This commit is contained in:
Al Tsai 2016-09-01 15:02:09 +08:00
parent fcb403fc25
commit 8f598a057d
2 changed files with 4 additions and 2 deletions

View File

@ -638,7 +638,8 @@ class TaskCache(CacheManager):
# extract the build ID; we use the .ini files embedded in the
# downloaded artifact for this. We could also use the uploaded
# public/build/buildprops.json for this purpose.
url = self._queue.buildUrl('getLatestArtifact', taskId, artifact_name)
replDict = {'taskId': taskId, 'name': artifact_name}
url = self._queue.buildUrl('getLatestArtifact', replDict=replDict)
urls.append(url)
if not urls:
raise ValueError('Task for {key} existed, but no artifacts found!'.format(key=key))

View File

@ -101,7 +101,8 @@ def fetch_artifact(queue, task_id, run_id, name, dest_dir):
write it to a file in dest_dir, and return the path to the written
file.
'''
url = queue.buildUrl('getArtifact', task_id, run_id, name)
replDict = {'taskId': task_id, 'runId': run_id, 'name': name}
url = queue.buildUrl('getArtifact', replDict=replDict)
fn = os.path.join(dest_dir, os.path.basename(name))
print('Fetching %s...' % name)
try: