Merge "Use six.text_type instead of unicode"

This commit is contained in:
Jenkins 2014-11-12 16:47:15 +00:00 committed by Gerrit Code Review
commit 08ffe7c1ee

View File

@ -148,7 +148,8 @@ class MetadataRequestHandler(wsgi.Application):
remote_address)
msg = _('An unknown error has occurred. '
'Please try your request again.')
raise webob.exc.HTTPInternalServerError(explanation=unicode(msg))
raise webob.exc.HTTPInternalServerError(
explanation=six.text_type(msg))
if meta_data is None:
LOG.error(_LE('Failed to get metadata for ip: %s'),
@ -205,7 +206,8 @@ class MetadataRequestHandler(wsgi.Application):
instance_id)
msg = _('An unknown error has occurred. '
'Please try your request again.')
raise webob.exc.HTTPInternalServerError(explanation=unicode(msg))
raise webob.exc.HTTPInternalServerError(
explanation=six.text_type(msg))
if meta_data is None:
LOG.error(_LE('Failed to get metadata for instance id: %s'),