Merge "cleanup openstack-common.conf and sync updated files"

This commit is contained in:
Jenkins
2015-06-14 20:09:05 +00:00
committed by Gerrit Code Review
4 changed files with 4 additions and 5 deletions
+2 -2
View File
@@ -17,14 +17,14 @@ See http://docs.openstack.org/developer/oslo.i18n/usage.html
"""
try:
import oslo.i18n
import oslo_i18n
# NOTE(dhellmann): This reference to o-s-l-o will be replaced by the
# application name when this module is synced into the separate
# repository. It is OK to have more than one translation function
# using the same domain, since there will still only be one message
# catalog.
_translators = oslo.i18n.TranslatorFactory(domain='glanceclient')
_translators = oslo_i18n.TranslatorFactory(domain='glanceclient')
# The primary translation function using the well-known name "_"
_ = _translators.primary
@@ -402,7 +402,7 @@ class CrudManager(BaseManager):
'name': self.resource_class.__name__,
'args': kwargs
}
raise exceptions.NotFound(404, msg)
raise exceptions.NotFound(msg)
elif num > 1:
raise exceptions.NoUniqueMatch
else:
@@ -465,7 +465,7 @@ def from_response(response, method, url):
kwargs["details"] = (error.get("details") or
six.text_type(body))
elif content_type.startswith("text/"):
kwargs["details"] = response.text
kwargs["details"] = getattr(response, 'text', '')
try:
cls = _code_map[response.status_code]