summaryrefslogtreecommitdiffstats
path: root/keystone/common/wsgi.py
diff options
context:
space:
mode:
authorDolph Mathews <dolph.mathews@gmail.com>2013-05-23 14:33:55 -0500
committerGerrit Code Review <review@openstack.org>2013-05-23 23:48:43 +0000
commitf9b535c84ed22f6831165cb0807029a44a01bddb (patch)
tree8ed4140ea358a24751c7ffeec2ffa24bdaa2f498 /keystone/common/wsgi.py
parent67175a667308e534c1d55931322bbd36e1e0a7c5 (diff)
downloadkeystone-f9b535c84ed22f6831165cb0807029a44a01bddb.tar.gz
keystone-f9b535c84ed22f6831165cb0807029a44a01bddb.tar.xz
keystone-f9b535c84ed22f6831165cb0807029a44a01bddb.zip
consistent i18n placeholders (flake8 H701, H702, H703)
- eliminates ambiguously defined keywords in i18n strings which may become incorrectly ordered in a corresponding translation. - ensures formatting operations occur outside of i18n calls - use bare multiline string concatenation instead of 'ab' + \n 'cd' - eliminates an 'empty localization string' (passing a variable to i18n function) Change-Id: I0d78b978cc730e5fb892b80dfacaaf6687cd80be
Diffstat (limited to 'keystone/common/wsgi.py')
-rw-r--r--keystone/common/wsgi.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/keystone/common/wsgi.py b/keystone/common/wsgi.py
index 4ea05628..a07ae117 100644
--- a/keystone/common/wsgi.py
+++ b/keystone/common/wsgi.py
@@ -181,8 +181,9 @@ class Application(BaseApplication):
try:
result = method(context, **params)
except exception.Unauthorized as e:
- LOG.warning(_("Authorization failed. %s from %s")
- % (e, req.environ['REMOTE_ADDR']))
+ LOG.warning(
+ _('Authorization failed. %(exception)s from %(remote_addr)s') %
+ {'exception': e, 'remote_addr': req.environ['REMOTE_ADDR']})
return render_exception(e)
except exception.Error as e:
LOG.warning(e)