diff options
Diffstat (limited to 'lorry')
-rwxr-xr-x | lorry | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -805,15 +805,15 @@ class Lorry(cliapp.Application): raw_file_refspecs = 'refs/heads/{branch}:refs/heads/{branch}'.format(branch=raw_file_branch) self.ensure_gitdir(gitdir) # Fetch the files - new_files = {} + new_files = [] for src in spec['urls']: - url = spec['urls'][src] + url = src['url'] url_path = urllib.parse.urlparse(url)[2] basename = os.path.basename(url_path) file_dest = os.path.join(dirname, basename) self.progress('.. checking if we need to fetch %s' % basename) if file_missing_or_empty(file_dest): - new_files[src] = file_dest + new_files.append((src['destination'], file_dest)) self.progress('.. attempting to fetch %s' % basename) try: with open(file_dest, 'wb') as raw_file, \ @@ -850,8 +850,8 @@ class Lorry(cliapp.Application): # Ensure the repo supports git LFS self.run_program(['git', 'lfs', 'install', '--local'], cwd=gitdir) - for src in new_files: - self.run_program(["%s.raw-file-importer" % lorry_path, new_files[src], src], cwd=gitdir) + for subpath, raw_file in new_files: + self.run_program(["%s.raw-file-importer" % lorry_path, raw_file, subpath], cwd=gitdir) def gitify_archive(self, archive_type, project_name, dirname, gitdir, spec): assert archive_type in ['zip', 'gzip', 'tar'] |