summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavanum Srinivas <davanum@gmail.com>2015-06-07 10:11:48 -0400
committerDavanum Srinivas (dims) <davanum@gmail.com>2015-06-10 11:59:12 +0000
commit5e85d61fb91355fdf9308521edf0efc94ecfe434 (patch)
treeeb71eff7988c1cc201e7dfecc55be889cb91f202
parentdfa98ab04c7fb7260b25e92af18caa2a016698c6 (diff)
downloadpython-glanceclient-5e85d61fb91355fdf9308521edf0efc94ecfe434.tar.gz
cleanup openstack-common.conf and sync updated files
periodic updates of latest from oslo-incubator. please note that files no longer on oslo-incubator mean that they have been moved to oslo.* libraries. So there's more work needed to remove these files and switch to appropriate libraries Change-Id: Icd71b4b1ea9f1df526614a29277f25a7ab47b721
-rw-r--r--glanceclient/openstack/common/_i18n.py4
-rw-r--r--glanceclient/openstack/common/apiclient/base.py2
-rw-r--r--glanceclient/openstack/common/apiclient/exceptions.py2
-rw-r--r--openstack-common.conf1
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