diff options
author | Petr Blaho <petrblaho@gmail.com> | 2014-06-12 15:29:47 +0200 |
---|---|---|
committer | Petr Blaho <petrblaho@gmail.com> | 2014-08-03 17:19:00 +0200 |
commit | 423c17e02bf84dc66b84a7e669563dd4df68cf86 (patch) | |
tree | 75bd593716b23998f3972eec24e930dce83ffdc8 | |
parent | 3cb592775d063df9afdb65e0d59338b31363d089 (diff) | |
download | oslo-db-423c17e02bf84dc66b84a7e669563dd4df68cf86.tar.gz |
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
-rw-r--r-- | oslo/db/sqlalchemy/test_migrations.py | 4 | ||||
-rw-r--r-- | oslo/db/sqlalchemy/utils.py | 3 | ||||
-rw-r--r-- | tox.ini | 2 |
3 files changed, 5 insertions, 4 deletions
diff --git a/oslo/db/sqlalchemy/test_migrations.py b/oslo/db/sqlalchemy/test_migrations.py index 9def0ed..d669577 100644 --- a/oslo/db/sqlalchemy/test_migrations.py +++ b/oslo/db/sqlalchemy/test_migrations.py @@ -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 diff --git a/oslo/db/sqlalchemy/utils.py b/oslo/db/sqlalchemy/utils.py index 5aa9341..92f7049 100644 --- a/oslo/db/sqlalchemy/utils.py +++ b/oslo/db/sqlalchemy/utils.py @@ -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() @@ -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 |