[PATCH 09/10] Pass string format arguments as paramters to logging

David Shea dshea at redhat.com
Wed Sep 25 18:21:53 UTC 2013


---
 scripts/instperf    | 2 +-
 scripts/makebumpver | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/instperf b/scripts/instperf
index 2caa222..f0d53b2 100755
--- a/scripts/instperf
+++ b/scripts/instperf
@@ -41,7 +41,7 @@ def logit():
          "swapUsed": int(swapTotal)-int(swapFree),
          "procs": topProcesses()}
 
-    mem_logger.debug("%(memUsed)d %(swapUsed)d %(procs)s" % d)
+    mem_logger.debug("%(memUsed)d %(swapUsed)d %(procs)s", d)
 
 mem_logger = logging.getLogger("memLog")
 mem_logger.setLevel(logging.DEBUG)
diff --git a/scripts/makebumpver b/scripts/makebumpver
index cac6bc3..f686da1 100755
--- a/scripts/makebumpver
+++ b/scripts/makebumpver
@@ -37,7 +37,7 @@ import textwrap
 
 class MakeBumpVer:
     def __init__(self, *args, **kwargs):
-        log.debug("%s" % (kwargs,))
+        log.debug("%s", kwargs)
         self.bzserver = 'bugzilla.redhat.com'
         self.bzurl = "https://%s/xmlrpc.cgi" % self.bzserver
         self.username = None
@@ -141,10 +141,10 @@ class MakeBumpVer:
 
         if not self.bz.logged_in:
             rc = self.bz.login(self.username, self.password)
-            log.debug("login rc = %s" % (rc,))
+            log.debug("login rc = %s", rc)
 
         bugs = self.bz.query({'bug_id': bug})
-        log.debug("bugs = %s" % (bugs))
+        log.debug("bugs = %s", bugs)
 
         if len(bugs) != 1:
             return None
-- 
1.8.3.1



More information about the anaconda-patches mailing list