mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
archive: pass src pkg file size to _download_file
This commit is contained in:
parent
7900a09763
commit
f5694d7cf6
@ -464,10 +464,6 @@ class SourcePackage(object):
|
||||
if self.dsc.verify_file(pathname):
|
||||
Logger.debug('Using existing %s', filename)
|
||||
return True
|
||||
size = [entry['size'] for entry in self.dsc['Files']
|
||||
if entry['name'] == filename]
|
||||
assert len(size) == 1
|
||||
size = int(size[0])
|
||||
|
||||
if urlparse(url).scheme in ["", "file"]:
|
||||
frompath = os.path.abspath(urlparse(url).path)
|
||||
@ -510,7 +506,7 @@ class SourcePackage(object):
|
||||
name = entry['name']
|
||||
for url in self._source_urls(name):
|
||||
try:
|
||||
if self._download_file(url, name):
|
||||
if self._download_file(url, name, size=int(entry['size'])):
|
||||
break
|
||||
except HTTPError as e:
|
||||
Logger.info('HTTP Error %i: %s', e.code, str(e))
|
||||
|
Loading…
x
Reference in New Issue
Block a user