replace string format arguments with function parameters
There are files containing string format arguments inside logging messages. Using logging function parameters should be preferred. Change-Id: I456f411ad6ca46a8c8de442c74c18276faca920e Partial-Bug: #1321274
This commit is contained in:
parent
c4d2d95eb3
commit
caababc62d
|
@ -79,7 +79,7 @@ class FixedIntervalLoopingCall(LoopingCallBase):
|
|||
break
|
||||
delay = interval - timeutils.delta_seconds(start, end)
|
||||
if delay <= 0:
|
||||
LOG.warn(_('task run outlasted interval by %s sec') %
|
||||
LOG.warn(_('task run outlasted interval by %s sec'),
|
||||
-delay)
|
||||
greenthread.sleep(delay if delay > 0 else 0)
|
||||
except LoopingCallDone as e:
|
||||
|
|
|
@ -118,7 +118,8 @@ class VMwareDriverException(Exception):
|
|||
# log the issue and the kwargs
|
||||
LOG.exception(_('Exception in string format operation'))
|
||||
for name, value in six.iteritems(kwargs):
|
||||
LOG.error("%s: %s" % (name, value))
|
||||
LOG.error("%(name)s: %(value)s",
|
||||
{'name': name, 'value': value})
|
||||
# at least get the core message out if something happened
|
||||
message = self.msg_fmt
|
||||
|
||||
|
|
Loading…
Reference in New Issue