Merge "Replace string format arguments with function parameters"

This commit is contained in:
Jenkins 2016-05-05 21:48:33 +00:00 committed by Gerrit Code Review
commit 48f4ac2e9b
7 changed files with 11 additions and 11 deletions

View File

@ -107,7 +107,7 @@ class Service(service.Service):
super(Service, self).start()
self.conn = create_connection(new=True)
LOG.debug("Creating Consumer connection for Service %s" %
LOG.debug("Creating Consumer connection for Service %s",
self.topic)
endpoints = [self.manager]

View File

@ -60,7 +60,7 @@ def read_cached_file(filename, force_reload=False):
cache_info = _FILE_CACHE.setdefault(filename, {})
if not cache_info or mtime > cache_info.get('mtime', 0):
LOG.debug(_("Reloading cached file %s") % filename)
LOG.debug(_("Reloading cached file %s"), filename)
with open(filename) as fap:
cache_info['data'] = fap.read()
cache_info['mtime'] = mtime

View File

@ -80,7 +80,7 @@ class FixedIntervalLoopingCall(LoopingCallBase):
delay = interval - timeutils.delta_seconds(start, end)
if delay <= 0:
LOG.warning(_('task run outlasted interval by %s '
'sec') % -delay)
'sec'), -delay)
greenthread.sleep(delay if delay > 0 else 0)
except LoopingCallDone as e:
self.stop()

View File

@ -38,7 +38,7 @@ def log_and_ignore_error(fn):
return fn(*args, **kwargs)
except Exception as e:
LOG.exception(_LE('An exception occurred processing '
'the API call: %s ') % e)
'the API call: %s '), e)
return wrapped

View File

@ -391,7 +391,7 @@ def _parse_check(rule):
try:
kind, match = rule.split(':', 1)
except Exception:
LOG.exception(_("Failed to understand rule %(rule)s") % locals())
LOG.exception(_("Failed to understand rule %(rule)s"), locals())
# If the rule is invalid, we'll fail closed
return FalseCheck()
@ -401,7 +401,7 @@ def _parse_check(rule):
elif None in _checks:
return _checks[None](kind, match)
else:
LOG.error(_("No handler for matches of kind %s") % kind)
LOG.error(_("No handler for matches of kind %s"), kind)
return FalseCheck()
@ -676,7 +676,7 @@ def _parse_text_rule(rule):
return state.result
except ValueError:
# Couldn't parse the rule
LOG.exception(_("Failed to understand rule %(rule)r") % locals())
LOG.exception(_("Failed to understand rule %(rule)r"), locals())
# Fail closed
return FalseCheck()

View File

@ -238,7 +238,7 @@ def ssh_execute(ssh, cmd, process_input=None,
# exit_status == -1 if no exit code was returned
if exit_status != -1:
LOG.debug(_('Result was %s') % exit_status)
LOG.debug(_('Result was %s'), exit_status)
if check_exit_code and exit_status != 0:
raise ProcessExecutionError(exit_code=exit_status,
stdout=stdout,

View File

@ -95,7 +95,7 @@ def updateimports(template):
template['imports'].append(nfvfile)
LOG.debug(_("%s") % path)
LOG.debug(_("%s"), path)
@log.log
@ -131,7 +131,7 @@ def get_mgmt_ports(tosca):
if vdu is not None:
name = 'mgmt_ip-%s' % vdu
mgmt_ports[name] = nt.name
LOG.debug('mgmt_ports: %s' % mgmt_ports)
LOG.debug('mgmt_ports: %s', mgmt_ports)
return mgmt_ports
@ -185,7 +185,7 @@ def post_process_heat_template(heat_tpl, mgmt_ports, res_tpl,
heat_dict['outputs'].update(output)
else:
heat_dict['outputs'] = output
LOG.debug(_('Added output for %s') % outputname)
LOG.debug(_('Added output for %s'), outputname)
add_resources_tpl(heat_dict, res_tpl)
if unsupported_res_prop:
convert_unsupported_res_prop(heat_dict, unsupported_res_prop)