From 1df028a725971cc2d7dcbd7b0231f0db271a178c Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Tue, 22 May 2018 07:05:43 -0500 Subject: [PATCH] Fix pylint W1201: logging-not-lazy Signed-off-by: Major Hayden --- skt/__init__.py | 8 +++++--- skt/runner.py | 4 ++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/skt/__init__.py b/skt/__init__.py index 804c89ef..b5865020 100644 --- a/skt/__init__.py +++ b/skt/__init__.py @@ -294,8 +294,10 @@ def getrname(self, uri): if not uri.endswith('/') else uri.split('/')[-2].replace('.git', '')) while self.get_remote_url(rname) == uri: - logging.warning("remote '%s' already exists with a different uri, " - "adding '_'" % rname) + logging.warning( + "remote '%s' already exists with a different uri, adding '_'", + rname + ) rname += '_' return rname @@ -428,7 +430,7 @@ def bisect_iter(self, bad): if m: binfo = m.group(1) ret = 1 - logging.warning("Bisected, bad commit: %s" % binfo) + logging.warning("Bisected, bad commit: %s", binfo) break else: logging.info(line) diff --git a/skt/runner.py b/skt/runner.py index 3635872f..a62dfa49 100644 --- a/skt/runner.py +++ b/skt/runner.py @@ -395,10 +395,10 @@ def gethost(self, jobid=None): if jobid is None: jobid = self.lastsubmitted - logging.info("gethost for %s" % jobid) + logging.info("gethost for %s", jobid) root = self.getresultstree(jobid) recipe = root.find("recipeSet/recipe") - logging.info("%s: %s" % (jobid, recipe.attrib.get("system"))) + logging.info("%s: %s", jobid, recipe.attrib.get("system")) return recipe.attrib.get("system")