From 43765a0f218a8518d09b7bbc6d3785726569a15e Mon Sep 17 00:00:00 2001 From: Ronald Bradford Date: Wed, 20 Jul 2016 15:33:55 -0400 Subject: [PATCH] Cleanup i18n marker functions to match Oslo usage Define marker functions as per usage in documentation. http://docs.openstack.org/developer/oslo.i18n/usage.html Change-Id: I564f5d1f31314be5c18420b6bc3d694a561d78f2 --- tox.ini | 2 +- zaqar/common/urls.py | 5 +---- zaqar/transport/wsgi/v2_0/urls.py | 4 +--- 3 files changed, 3 insertions(+), 8 deletions(-) diff --git a/tox.ini b/tox.ini index 43263b428..4189f13ef 100644 --- a/tox.ini +++ b/tox.ini @@ -79,7 +79,7 @@ exclude = .venv*,.git,.tox,dist,doc,*lib/python*,*.egg,.update-venv max-complexity = 16 [hacking] -import_exceptions = zaqar.i18n._ +import_exceptions = zaqar.i18n [testenv:install-guide] # NOTE(jaegerandi): this target does not use constraints because diff --git a/zaqar/common/urls.py b/zaqar/common/urls.py index b5dc0afcb..e59e1359d 100644 --- a/zaqar/common/urls.py +++ b/zaqar/common/urls.py @@ -20,10 +20,7 @@ import hmac from oslo_utils import timeutils import six -from zaqar import i18n - - -_LE = i18n._LE +from zaqar.i18n import _LE _DATE_FORMAT = '%Y-%m-%dT%H:%M:%S' diff --git a/zaqar/transport/wsgi/v2_0/urls.py b/zaqar/transport/wsgi/v2_0/urls.py index d5acc1c21..d1d94eacb 100644 --- a/zaqar/transport/wsgi/v2_0/urls.py +++ b/zaqar/transport/wsgi/v2_0/urls.py @@ -18,13 +18,11 @@ from oslo_log import log as logging import six from zaqar.common import urls -from zaqar import i18n +from zaqar.i18n import _LE from zaqar.transport import utils from zaqar.transport.wsgi import errors as wsgi_errors from zaqar.transport.wsgi import utils as wsgi_utils -_ = i18n._ -_LE = i18n._LE LOG = logging.getLogger(__name__) _KNOWN_KEYS = {'methods', 'expires', 'paths'}