summaryrefslogtreecommitdiffstats
path: root/keystone/common/wsgi.py
diff options
context:
space:
mode:
authorjiataotj <jiataotj@cn.ibm.com>2013-05-31 00:18:28 +0800
committerjiataotj <jiataotj@cn.ibm.com>2013-07-26 13:43:27 +0800
commitf976bbe697002367ff00a0588a3181fd42008e1c (patch)
treea5763c4d4725ec29bb631044bd071e1ff77248c7 /keystone/common/wsgi.py
parent0a401529947c98ab761256e233b157071a57ab70 (diff)
downloadkeystone-f976bbe697002367ff00a0588a3181fd42008e1c.tar.gz
keystone-f976bbe697002367ff00a0588a3181fd42008e1c.tar.xz
keystone-f976bbe697002367ff00a0588a3181fd42008e1c.zip
Implement exception module i18n support
The doc string in exception.py of Keystone will be returned with __doc__ method, but cannot realize the internationalization.Change exception module to enable i18n support. Changes in the patch are: 1, useing class variable msg_fmt to replace class __doc__ 2, modify wsgi.render_exception function using unicode function to replace str function 3, modify/add UT test cases Fixes: bug # 1179425 Change-Id: I75c1229c905a2625d2f6961d1a8dd3958eac51a5
Diffstat (limited to 'keystone/common/wsgi.py')
-rw-r--r--keystone/common/wsgi.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/keystone/common/wsgi.py b/keystone/common/wsgi.py
index c7e30576..381f1ff0 100644
--- a/keystone/common/wsgi.py
+++ b/keystone/common/wsgi.py
@@ -583,7 +583,7 @@ def render_exception(error):
body = {'error': {
'code': error.code,
'title': error.title,
- 'message': str(error)
+ 'message': unicode(error)
}}
if isinstance(error, exception.AuthPluginException):
body['error']['identity'] = error.authentication