downloader: fix logger exception
When DEB version in a package list file is not valid/doesn't match the DEB file, downloader attempts to print a warning, but fails because logger format string has a typo. This results in a Python exception. Solution: fix the log message's format stirng TESTS ======================== * Reproduce the problem by adding a bad package version to one of the DEB list files in stx-tools * Re-run downloader with a fix and make sure the warning is printed correctly. Closes-Bug: 2076268 Change-Id: Ib2f34528c7382374dadffcc1ee0bb77dc1614c84 Signed-off-by: Davlet Panech <davlet.panech@windriver.com>
This commit is contained in:
parent
5ed3c592c3
commit
bbf58068f5
@ -412,12 +412,12 @@ class DebDownloader(BaseDownloader):
|
||||
url_dict = utils.deb_file_name_to_dict(os.path.basename(url).replace("%2B", "+"))
|
||||
logger.debug("dkg_data: name=%s, ver=%s, url=%s, url_dict=%s, file=%s", pkg_name, pkg_ver, url, str(url_dict), list_file)
|
||||
if url_dict['ver'] and url_dict['ver'] != pkg_ver:
|
||||
logger.warning("Package version mismatch for package %s, $s vs %s, in file %s", pkg_name, pkg_ver, url_dict['ver'], list_file)
|
||||
logger.warning("Package version mismatch for package %s, %s vs %s, in file %s", pkg_name, pkg_ver, url_dict['ver'], list_file)
|
||||
pkg_ver = url_dict['ver']
|
||||
if url_dict['epoch'] and url_dict['epoch'] != pkg_epoch:
|
||||
logger.warning("Package epoch mismatch for package %s, $s vs %s, in file %s", pkg_name, pkg_epoch, url_dict['epoch'], list_file)
|
||||
pkg_epoch = url_dict['epoch']
|
||||
|
||||
|
||||
# Get arch from filename
|
||||
arch = pathlib.Path(url).stem.split("_")[-1]
|
||||
else:
|
||||
|
Loading…
Reference in New Issue
Block a user