Use lazy % formatting in logging functions

pylint complains:

```
W1201: Use lazy % formatting in logging functions
```
This commit is contained in:
Benjamin Drung 2025-12-03 13:36:48 +01:00
parent ef5e3d8066
commit 1c81f0872d
2 changed files with 4 additions and 5 deletions

View File

@ -65,7 +65,7 @@ def main():
err = True
continue
Logger.info(prefix + version)
Logger.info("%s%s", prefix, version)
if err:
sys.exit(1)

View File

@ -667,20 +667,19 @@ class Archive(BaseWrapper):
rversion = getattr(record, "binary_package_version", None)
else:
rversion = getattr(record, "source_package_version", None)
skipmsg = f"Skipping version {rversion}: "
if record.pocket not in pockets:
err_msg = f"pocket {record.pocket} not in ({','.join(pockets)})"
Logger.debug(skipmsg + err_msg)
Logger.debug("Skipping version %s: %s", rversion, err_msg)
continue
if record.status not in statuses:
err_msg = f"status {record.status} not in ({','.join(statuses)})"
Logger.debug(skipmsg + err_msg)
Logger.debug("Skipping version %s: %s", rversion, err_msg)
continue
release = wrapper(record)
if binary and archtag and archtag != release.arch:
err_msg = f"arch {release.arch} does not match requested arch {archtag}"
Logger.debug(skipmsg + err_msg)
Logger.debug("Skipping version %s: %s", rversion, err_msg)
continue
# results are ordered so first is latest
cache[index] = release