Merge "Handle log message interpolation by the logger"

This commit is contained in:
Jenkins 2017-04-16 12:10:50 +00:00 committed by Gerrit Code Review
commit 196474f6f3
5 changed files with 10 additions and 8 deletions

View File

@ -215,8 +215,8 @@ class DeleteFirewallGroup(command.Command):
except Exception as e: except Exception as e:
result += 1 result += 1
LOG.error(_("Failed to delete firewall group with " LOG.error(_("Failed to delete firewall group with "
"name or ID '%(firewall_group)s': %(e)s") % { "name or ID '%(firewall_group)s': %(e)s"),
const.FWG: fwg, 'e': e}) {const.FWG: fwg, 'e': e})
if result > 0: if result > 0:
total = len(parsed_args.firewall_group) total = len(parsed_args.firewall_group)

View File

@ -170,8 +170,8 @@ class DeleteFirewallPolicy(command.Command):
except Exception as e: except Exception as e:
result += 1 result += 1
LOG.error(_("Failed to delete Firewall policy with " LOG.error(_("Failed to delete Firewall policy with "
"name or ID '%(firewall_policy)s': %(e)s") % { "name or ID '%(firewall_policy)s': %(e)s"),
const.FWP: fwp, 'e': e}) {const.FWP: fwp, 'e': e})
if result > 0: if result > 0:
total = len(parsed_args.firewall_policy) total = len(parsed_args.firewall_policy)

View File

@ -229,8 +229,8 @@ class DeleteFirewallRule(command.Command):
except Exception as e: except Exception as e:
result += 1 result += 1
LOG.error(_("Failed to delete Firewall rule with " LOG.error(_("Failed to delete Firewall rule with "
"name or ID '%(firewall_rule)s': %(e)s") % { "name or ID '%(firewall_rule)s': %(e)s"),
const.FWR: fwr, 'e': e}) {const.FWR: fwr, 'e': e})
if result > 0: if result > 0:
total = len(parsed_args.firewall_rule) total = len(parsed_args.firewall_rule)

View File

@ -112,8 +112,8 @@ class DeleteNetworkTrunk(command.Command):
except Exception as e: except Exception as e:
result += 1 result += 1
LOG.error(_("Failed to delete trunk with name " LOG.error(_("Failed to delete trunk with name "
"or ID '%(trunk)s': %(e)s") "or ID '%(trunk)s': %(e)s"),
% {'trunk': trunk, 'e': e}) {'trunk': trunk, 'e': e})
if result > 0: if result > 0:
total = len(parsed_args.trunk) total = len(parsed_args.trunk)
msg = (_("%(result)s of %(total)s trunks failed " msg = (_("%(result)s of %(total)s trunks failed "

View File

@ -55,3 +55,5 @@ commands = sphinx-build -a -E -d releasenotes/build/doctrees -b html releasenote
[flake8] [flake8]
show-source = true show-source = true
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,tools
# H904: Delay string interpolations at logging calls
enable-extensions=H904