Skip to content

Commit 3e0dc4a

Browse files
committed
Fix new pylint on f20
1 parent d366ed8 commit 3e0dc4a

5 files changed

Lines changed: 14 additions & 14 deletions

File tree

bin/bugzilla

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1053,7 +1053,7 @@ def main(bzinstance=None):
10531053
log.info('Autodetecting Bugzilla type')
10541054
bzclass = bugzilla.Bugzilla
10551055
elif global_opt.bztype in bugzilla.classlist:
1056-
log.info('Using Bugzilla class %s' % global_opt.bztype)
1056+
log.info('Using Bugzilla class %s', global_opt.bztype)
10571057
bzclass = getattr(bugzilla, global_opt.bztype)
10581058
else:
10591059
parser.error("bztype must be one of: %s" % str(bugzilla.classlist))

bugzilla/__init__.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ class NovellBugzilla(Bugzilla34):
3232

3333
def getBugzillaClassForURL(url):
3434
url = Bugzilla3.fix_url(url)
35-
log.debug("Detecting subclass for %s" % url)
35+
log.debug("Detecting subclass for %s", url)
3636
s = xmlrpclib.ServerProxy(url)
3737
rhbz = False
3838
bzversion = ''
@@ -53,7 +53,7 @@ def getBugzillaClassForURL(url):
5353
rhbz = True
5454
except xmlrpclib.Fault:
5555
pass
56-
log.debug("rhbz=%s" % str(rhbz))
56+
log.debug("rhbz=%s", str(rhbz))
5757

5858
# Try to get the bugzilla version string
5959
try:
@@ -62,7 +62,7 @@ def getBugzillaClassForURL(url):
6262
bzversion = r['version']
6363
except xmlrpclib.Fault:
6464
pass
65-
log.debug("bzversion='%s'" % str(bzversion))
65+
log.debug("bzversion='%s'", str(bzversion))
6666

6767
# note preference order: RHBugzilla* wins if available
6868
if rhbz:
@@ -73,7 +73,7 @@ def getBugzillaClassForURL(url):
7373
elif bzversion.startswith("4.2"):
7474
c = Bugzilla42
7575
else:
76-
log.debug("No explicit match for %s, using latest bz4" % bzversion)
76+
log.debug("No explicit match for %s, using latest bz4", bzversion)
7777
c = Bugzilla44
7878
else:
7979
if bzversion.startswith('3.6'):
@@ -99,7 +99,7 @@ class Bugzilla(_BugzillaBase):
9999
# __init__ method of base class not called
100100

101101
def __init__(self, **kwargs):
102-
log.info("Bugzilla v%s initializing" % __version__)
102+
log.info("Bugzilla v%s initializing", __version__)
103103
if 'url' not in kwargs:
104104
raise TypeError("You must pass a valid bugzilla URL")
105105

@@ -114,7 +114,7 @@ def __init__(self, **kwargs):
114114

115115
self.__class__ = c
116116
c.__init__(self, **kwargs)
117-
log.info("Chose subclass %s v%s" % (c.__name__, c.version))
117+
log.info("Chose subclass %s v%s", c.__name__, c.version)
118118

119119

120120
# This is the list of possible Bugzilla instances an app can use,

bugzilla/base.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -447,13 +447,13 @@ def readconfig(self, configpath=None):
447447
for s in sorted(c.sections(),
448448
lambda a, b: cmp(len(a), len(b)) or cmp(a, b)):
449449
if s in self.url:
450-
log.debug("Found matching section: %s" % s)
450+
log.debug("Found matching section: %s", s)
451451
section = s
452452
if not section:
453453
return
454454
for k, v in c.items(section):
455455
if k in ('user', 'password'):
456-
log.debug("Setting '%s' from configfile" % k)
456+
log.debug("Setting '%s' from configfile", k)
457457
setattr(self, k, v)
458458

459459
def connect(self, url=None):

bugzilla/bug.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ def __init__(self, bugzilla, **kwargs):
2727
self.bugzilla = bugzilla
2828

2929
if 'dict' in kwargs and kwargs['dict']:
30-
log.debug("Bug(%s)" % sorted(kwargs['dict'].keys()))
30+
log.debug("Bug(%s)", sorted(kwargs['dict'].keys()))
3131
self._update_dict(kwargs['dict'])
3232

3333
if 'bug_id' in kwargs:
34-
log.debug("Bug(%i)" % kwargs['bug_id'])
34+
log.debug("Bug(%i)", kwargs['bug_id'])
3535
setattr(self, 'id', kwargs['bug_id'])
3636

3737
# Back compat for a previously handled param

tests/modify.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ def testWhiteboard(self):
9999
{'cf_devel_whiteboard': 'devel-duh',
100100
'cf_internal_whiteboard': 'internal-hey',
101101
'cf_qa_whiteboard': 'yo-qa'}, wbout={
102-
"qa": ([], ["foo"]),
103-
"internal": (["bar"], []),
104-
"devel": ([], ["yay"])},
102+
"qa": ([], ["foo"]),
103+
"internal": (["bar"], []),
104+
"devel": ([], ["yay"])},
105105
)
106106

107107
def testMisc(self):

0 commit comments

Comments
 (0)