From ebe80393d11ada7bc4159dc60886f9a799b4c026 Mon Sep 17 00:00:00 2001 From: Major Hayden Date: Mon, 21 May 2018 16:07:04 -0500 Subject: [PATCH] Fix pylint W1201: logging-not-lazy Signed-off-by: Major Hayden --- skt/__init__.py | 11 ++++++++--- skt/runner.py | 8 ++++++-- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/skt/__init__.py b/skt/__init__.py index 804c89ef..f4207a10 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,10 @@ 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..bbd44b5f 100644 --- a/skt/runner.py +++ b/skt/runner.py @@ -395,10 +395,14 @@ 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")