archive: change log level of some messages

Change some messages to the correct log level for their importanance.

Signed-off-by: Dan Streetman <ddstreet@canonical.com>
This commit is contained in:
Dan Streetman 2020-03-13 09:51:03 -04:00
parent 2cfcbdb300
commit 494e0d6ddd

View File

@ -425,7 +425,7 @@ class SourcePackage(object):
pathname = os.path.join(self.workdir, filename) pathname = os.path.join(self.workdir, filename)
if self._verify_file(pathname, dscverify, sha1sum, sha256sum, size): if self._verify_file(pathname, dscverify, sha1sum, sha256sum, size):
Logger.debug('Using existing file %s', filename) Logger.info('Using existing file %s', filename)
return True return True
if urlparse(url).scheme in ["", "file"]: if urlparse(url).scheme in ["", "file"]:
@ -452,11 +452,11 @@ class SourcePackage(object):
except HTTPError as e: except HTTPError as e:
# It's ok if the file isn't found; we try multiple places to download # It's ok if the file isn't found; we try multiple places to download
if e.code == 404: if e.code == 404:
Logger.info("File not found at %s" % url) Logger.debug("File not found at %s" % url)
continue continue
Logger.info('HTTP Error %i: %s', e.code, str(e)) Logger.error('HTTP Error %i: %s', e.code, str(e))
except URLError as e: except URLError as e:
Logger.info('URL Error: %s', e.reason) Logger.error('URL Error: %s', e.reason)
else: else:
raise DownloadError('File %s could not be found' % name) raise DownloadError('File %s could not be found' % name)
@ -492,13 +492,13 @@ class SourcePackage(object):
except HTTPError as e: except HTTPError as e:
# It's ok if the file isn't found; we try multiple places to download # It's ok if the file isn't found; we try multiple places to download
if e.code == 404: if e.code == 404:
Logger.info("File not found at %s" % url) Logger.debug("File not found at %s" % url)
continue continue
Logger.info('HTTP Error %i: %s', e.code, str(e)) Logger.error('HTTP Error %i: %s', e.code, str(e))
except URLError as e: except URLError as e:
Logger.info('URL Error: %s', e.reason) Logger.error('URL Error: %s', e.reason)
else: else:
Logger.info("Could not download from any location: %s", fname) Logger.error("Could not download from any location: %s", fname)
return total return total
def verify(self): def verify(self):