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() diff --git a/tox.ini b/tox.ini index 2d3bdd8..09d9bdc 100644 --- a/tox.ini +++ b/tox.ini @@ -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