diff --git a/neutron_vpnaas/services/vpn/device_drivers/ipsec.py b/neutron_vpnaas/services/vpn/device_drivers/ipsec.py index 09383d1c9..cebcac9a6 100644 --- a/neutron_vpnaas/services/vpn/device_drivers/ipsec.py +++ b/neutron_vpnaas/services/vpn/device_drivers/ipsec.py @@ -465,7 +465,7 @@ class OpenSwanProcess(BaseSwanProcess): # indicates something bad has happened and this is # valuable information for figuring it out. LOG.error('Process %(pid)s exists with command ' - 'line %(cmd_line)s.' % + 'line %(cmd_line)s.', {'pid': pid, 'cmd_line': cmd_line}) return True diff --git a/neutron_vpnaas/services/vpn/device_drivers/strongswan_ipsec.py b/neutron_vpnaas/services/vpn/device_drivers/strongswan_ipsec.py index c45222ebc..17ef226b9 100644 --- a/neutron_vpnaas/services/vpn/device_drivers/strongswan_ipsec.py +++ b/neutron_vpnaas/services/vpn/device_drivers/strongswan_ipsec.py @@ -82,7 +82,7 @@ class StrongSwanProcess(ipsec.BaseSwanProcess): self.DIALECT_MAP['v2'] = 'ikev2' self.DIALECT_MAP['sha256'] = 'sha256' self._strongswan_piddir = self._get_strongswan_piddir() - LOG.debug("strongswan piddir is '%s'" % (self._strongswan_piddir)) + LOG.debug("strongswan piddir is '%s'", (self._strongswan_piddir)) super(StrongSwanProcess, self).__init__(conf, process_id, vpnservice, namespace) diff --git a/neutron_vpnaas/services/vpn/plugin.py b/neutron_vpnaas/services/vpn/plugin.py index f3ba99496..c70c2c790 100644 --- a/neutron_vpnaas/services/vpn/plugin.py +++ b/neutron_vpnaas/services/vpn/plugin.py @@ -137,7 +137,7 @@ class VPNDriverPlugin(VPNPlugin, vpn_db.VPNPluginRpcDbMixin): # Use default provider provider = self.default_provider - LOG.debug("Selected provider %s" % provider) + LOG.debug("Selected provider %s", provider) return provider def _get_driver_for_vpnservice(self, context, vpnservice): diff --git a/tox.ini b/tox.ini index 0f49dc107..762d92292 100644 --- a/tox.ini +++ b/tox.ini @@ -87,7 +87,12 @@ commands = sphinx-build -W -b html doc/source doc/build # H405 multi line docstring summary not separated with an empty line # TODO(dougwig) -- uncomment this to test for remaining linkages # N530 direct neutron imports not allowed +# N531 Log messages require translation hints +# H106 Don't put vim configuration in source files +# H203 Use assertIs(Not)None to check for None +# H904 Delay string interpolations at logging calls ignore = E125,E126,E128,E129,E265,H404,H405,N530,N531 +enable-extensions=H106,H203,H904 show-source = true exclude = .venv,.git,.tox,dist,doc,.tmp,*lib/python*,*egg,build,tools,.ropeproject,rally-scenarios import-order-style = pep8