Uses keyword params for i18n string to pass H703

Uses keyword params for i18n string to pass H703 check.
Removes H703 from ignore setting in tox.ini.

Change-Id: I7b4f48be739167aed7dcb33a8a70e24adfe02672
This commit is contained in:
Petr Blaho 2014-06-12 15:29:47 +02:00
parent 3cb592775d
commit 423c17e02b
3 changed files with 5 additions and 4 deletions

View File

@ -243,8 +243,8 @@ class WalkVersionsMixin(object):
if check:
check(self.migrate_engine, data)
except exc.DbMigrationError:
LOG.error(_LE("Failed to migrate to version %s on engine %s") %
(version, self.migrate_engine))
msg = _LE("Failed to migrate to version %(ver)s on engine %(eng)s")
LOG.error(msg, {"ver": version, "eng": self.migrate_engine})
raise

View File

@ -686,7 +686,8 @@ def is_backend_avail(backend, database, user=None, passwd=None):
except Exception as e:
# intentionally catch all to handle exceptions even if we don't
# have any backend code loaded.
LOG.info(_LI("The %s backend is unavailable: %s"), backend, e)
msg = _LI("The %(backend)s backend is unavailable: %(exception)s")
LOG.info(msg, {"backend": backend, "exception": e})
return False
else:
connection.close()

View File

@ -45,7 +45,7 @@ commands =
# see https://bugs.launchpad.net/hacking/+bug/1329363
show-source = True
ignore = E123,E125,E128,E265,H305,H307,H703,H803,H904
ignore = E123,E125,E128,E265,H305,H307,H803,H904
builtins = _
exclude=.venv,.git,.tox,dist,doc,*openstack/common*,*lib/python*,*egg,build