diff options
author | Mike Durnosvistov <mdurnosvistov@mirantis.com> | 2014-09-19 18:32:50 +0300 |
---|---|---|
committer | Mike Durnosvistov <mdurnosvistov@mirantis.com> | 2014-11-20 11:19:16 +0200 |
commit | e8c0b822f0ef4164d3752a1d8307b55fe4183a3c (patch) | |
tree | 76db903c019721108d136060f25fe9c5245eda2f /nova/context.py | |
parent | b7535793afb4e40d8920a85bb44a894a6c6af1c2 (diff) | |
download | nova-e8c0b822f0ef4164d3752a1d8307b55fe4183a3c.tar.gz |
Replacement `_` on `_LW` in all LOG.warning part 1
oslo.i18n uses different marker functions to separate the
translatable messages into different catalogs, which the translation
teams can prioritize translating. For details, please refer to:
http://docs.openstack.org/developer/oslo.i18n/guidelines.html#guidelines-for-use-in-openstack
There were not marker fuctions some places in directory network.
This commit makes changes:
* Add missing marker functions
* Use ',' instead of '%' while adding variables to log messages
Added a hacking rule for the warning about checking
translation for it and checking logging level `warning` instead
alias `warn`.
Change-Id: I2bced49dc5a0408a94d5d20d85b20c682886edbe
Diffstat (limited to 'nova/context.py')
-rw-r--r-- | nova/context.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/nova/context.py b/nova/context.py index dafc95a6bd..4e0a7d038d 100644 --- a/nova/context.py +++ b/nova/context.py @@ -23,8 +23,8 @@ from oslo.utils import timeutils import six from nova import exception -from nova.i18n import _ from nova.openstack.common import context +from nova.i18n import _, _LW from nova.openstack.common import local from nova.openstack.common import log as logging from nova import policy @@ -57,8 +57,8 @@ class RequestContext(object): because they possibly came in from older rpc messages. """ if kwargs: - LOG.warn(_('Arguments dropped when creating context: %s') % - str(kwargs)) + LOG.warning(_LW('Arguments dropped when creating context: %s') % + str(kwargs)) self.user_id = user_id self.project_id = project_id |