mirror of
https://git.launchpad.net/ubuntu-dev-tools
synced 2025-03-31 21:01:07 +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
|
arch = None
|
||||||
|
|
||||||
for bpph in self.lp_spph.getBinaries(arch=arch, name=name, ext=ext):
|
for bpph in self.lp_spph.getBinaries(arch=arch, name=name, ext=ext):
|
||||||
found = False
|
|
||||||
fname = bpph.getFileName()
|
fname = bpph.getFileName()
|
||||||
fsha1 = bpph.binaryFileSha1(fname)
|
fsha1 = bpph.binaryFileSha1(fname)
|
||||||
fsha256 = bpph.binaryFileSha256(fname)
|
fsha256 = bpph.binaryFileSha256(fname)
|
||||||
@ -540,14 +539,12 @@ class SourcePackage(object):
|
|||||||
for url in self._binary_urls(fname, bpph):
|
for url in self._binary_urls(fname, bpph):
|
||||||
try:
|
try:
|
||||||
if self._download_file(url, fname, False, fsize):
|
if self._download_file(url, fname, False, fsize):
|
||||||
found = True
|
total += 1
|
||||||
break
|
break
|
||||||
except HTTPError as e:
|
except HTTPError as e:
|
||||||
Logger.info('HTTP Error %i: %s', e.code, str(e))
|
Logger.info('HTTP Error %i: %s', e.code, str(e))
|
||||||
except URLError as e:
|
except URLError as e:
|
||||||
Logger.info('URL Error: %s', e.reason)
|
Logger.info('URL Error: %s', e.reason)
|
||||||
if found:
|
|
||||||
total += 1
|
|
||||||
else:
|
else:
|
||||||
Logger.info("Could not download from any location: %s", fname)
|
Logger.info("Could not download from any location: %s", fname)
|
||||||
return total
|
return total
|
||||||
|
Loading…
x
Reference in New Issue
Block a user