diff options
| author | Gábor Antal <antal@inf.u-szeged.hu> | 2017-02-07 17:54:11 +0100 |
|---|---|---|
| committer | jiansong <jian.song@easystack.cn> | 2017-03-08 10:00:34 -0800 |
| commit | ccceffa7f56bfcc2ff42f98a6272ace866993d09 (patch) | |
| tree | 882ec2c0a2410f1f44bda4c62fc14b0726a0b666 /troveclient/auth_plugin.py | |
| parent | 4139774157f960c9ce8786b980473853d6bb7815 (diff) | |
| download | python-troveclient-ccceffa7f56bfcc2ff42f98a6272ace866993d09.tar.gz | |
Handle log message interpolation by the logger
According to OpenStack Guideline[1], logged string message should be
interpolated by the logger.
Also, upgraded hacking requirement, to enable H904 check.
[1]: http://docs.openstack.org/developer/oslo.i18n/guidelines.html#adding-variables-to-log-messages
Co-Authored-By: jiansong <jian.song@easystack.cn>
Change-Id: I3f020b6bcb1b9bf6d18a3b4f738c13cccd1bbff8
Closes-Bug: #1596829
Diffstat (limited to 'troveclient/auth_plugin.py')
| -rw-r--r-- | troveclient/auth_plugin.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/troveclient/auth_plugin.py b/troveclient/auth_plugin.py index 7811d06..bc6d9b4 100644 --- a/troveclient/auth_plugin.py +++ b/troveclient/auth_plugin.py @@ -24,7 +24,7 @@ from troveclient._i18n import _ from troveclient import exceptions -logger = logging.getLogger(__name__) +LOG = logging.getLogger(__name__) _discovered_plugins = {} @@ -40,8 +40,8 @@ def discover_auth_systems(): try: auth_plugin = ep.load() except (ImportError, pkg_resources.UnknownExtra, AttributeError) as e: - logger.debug(_("ERROR: Cannot load auth plugin %s") % ep.name) - logger.debug(e, exc_info=1) + LOG.debug(_("ERROR: Cannot load auth plugin %s"), ep.name) + LOG.debug(e, exc_info=1) else: _discovered_plugins[ep.name] = auth_plugin |
