diff options
author | Jenkins <jenkins@review.openstack.org> | 2015-06-14 20:09:05 +0000 |
---|---|---|
committer | Gerrit Code Review <review@openstack.org> | 2015-06-14 20:09:05 +0000 |
commit | e863cb3f94d3c9841a9ea5506a2fdfd795e348d1 (patch) | |
tree | cc2a9f2f27bd58064a375d99787e7cd60cd310d7 | |
parent | 5ce9c7dc964be0b3e8f9f273169b77ada85cd8ec (diff) | |
parent | 5e85d61fb91355fdf9308521edf0efc94ecfe434 (diff) | |
download | python-glanceclient-e863cb3f94d3c9841a9ea5506a2fdfd795e348d1.tar.gz |
Merge "cleanup openstack-common.conf and sync updated files"
-rw-r--r-- | glanceclient/openstack/common/_i18n.py | 4 | ||||
-rw-r--r-- | glanceclient/openstack/common/apiclient/base.py | 2 | ||||
-rw-r--r-- | glanceclient/openstack/common/apiclient/exceptions.py | 2 | ||||
-rw-r--r-- | openstack-common.conf | 1 |
4 files changed, 4 insertions, 5 deletions
diff --git a/glanceclient/openstack/common/_i18n.py b/glanceclient/openstack/common/_i18n.py index cee8f01..d1339ad 100644 --- a/glanceclient/openstack/common/_i18n.py +++ b/glanceclient/openstack/common/_i18n.py @@ -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 diff --git a/glanceclient/openstack/common/apiclient/base.py b/glanceclient/openstack/common/apiclient/base.py index b208b06..3fc69dd 100644 --- a/glanceclient/openstack/common/apiclient/base.py +++ b/glanceclient/openstack/common/apiclient/base.py @@ -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: diff --git a/glanceclient/openstack/common/apiclient/exceptions.py b/glanceclient/openstack/common/apiclient/exceptions.py index be234a9..c8669f7 100644 --- a/glanceclient/openstack/common/apiclient/exceptions.py +++ b/glanceclient/openstack/common/apiclient/exceptions.py @@ -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] diff --git a/openstack-common.conf b/openstack-common.conf index e674bc9..b1b3092 100644 --- a/openstack-common.conf +++ b/openstack-common.conf @@ -2,7 +2,6 @@ # The list of modules to copy from openstack-common module=apiclient -module=gettextutils # The base module to hold the copy of openstack.common base=glanceclient |