From 0c12169130e5bd17b8cf84997a0acc93ae62de45 Mon Sep 17 00:00:00 2001 From: Eric Torres Date: Fri, 3 May 2019 12:25:55 -0700 Subject: [PATCH] Use % formatting for log messages over f-strings --- packaging_scripts/pkgfiles.py | 4 ++-- packaging_scripts/repos.py | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/packaging_scripts/pkgfiles.py b/packaging_scripts/pkgfiles.py index dca7877..b8e00c1 100644 --- a/packaging_scripts/pkgfiles.py +++ b/packaging_scripts/pkgfiles.py @@ -61,7 +61,7 @@ def add(pkgfile, cachedir): :param cachedir: cache directory to move package to :type cachedir: path-like object """ - syslog.info(f"Adding {pkgfile} to {cachedir}") + syslog.info("Adding %s to %s", pkgfile, cachedir) shutil.move(pkgfile, cachedir / pkgfile.name) @@ -72,7 +72,7 @@ def delete(pkg): :type pkg: path-like object """ pkg.unlink() - syslog.info(f"Removed {pkg}") + syslog.info("Removed %s", pkg) def _filter_by_regex(regex_expression, iterable): diff --git a/packaging_scripts/repos.py b/packaging_scripts/repos.py index 9ba3798..36bc46b 100644 --- a/packaging_scripts/repos.py +++ b/packaging_scripts/repos.py @@ -44,8 +44,8 @@ def db_modify(operation, db, *args): else: raise ValueError(f"Invalid operation specified: {operation}") - syslog.debug(f"Database: {db}") - syslog.debug(f"Arguments: {args}") + syslog.debug("Database: %s", db) + syslog.debug("Arguments: %s", args) try: process = _run_script(operation, str(db), *args)