mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-13 08:01:09 +00:00
archive: remove unneeded 'found' flag
This var isn't needed - just using for/else is better
This commit is contained in:
parent
e1f2cbf831
commit
45253b398c
@ -532,7 +532,6 @@ class SourcePackage(object):
|
||||
arch = None
|
||||
|
||||
for bpph in self.lp_spph.getBinaries(arch=arch, name=name, ext=ext):
|
||||
found = False
|
||||
fname = bpph.getFileName()
|
||||
fsha1 = bpph.binaryFileSha1(fname)
|
||||
fsha256 = bpph.binaryFileSha256(fname)
|
||||
@ -540,14 +539,12 @@ class SourcePackage(object):
|
||||
for url in self._binary_urls(fname, bpph):
|
||||
try:
|
||||
if self._download_file(url, fname, False, fsize):
|
||||
found = True
|
||||
total += 1
|
||||
break
|
||||
except HTTPError as e:
|
||||
Logger.info('HTTP Error %i: %s', e.code, str(e))
|
||||
except URLError as e:
|
||||
Logger.info('URL Error: %s', e.reason)
|
||||
if found:
|
||||
total += 1
|
||||
else:
|
||||
Logger.info("Could not download from any location: %s", fname)
|
||||
return total
|
||||
|
Loading…
x
Reference in New Issue
Block a user