summaryrefslogtreecommitdiff
path: root/keystoneclient/adapter.py
diff options
context:
space:
mode:
authorJamie Lennox <jamielennox@redhat.com>2014-07-07 15:19:18 +1000
committerJamie Lennox <jamielennox@redhat.com>2014-07-15 13:31:06 +1000
commit1145d9424b0fc4ae5ff82719a53e4e067be592c3 (patch)
treee827a4782f7ecfb255fd69e793632be57ddeceec /keystoneclient/adapter.py
parent0068a4e448a3c37d81bbfcc127ba214f809718d5 (diff)
downloadpython-keystoneclient-1145d9424b0fc4ae5ff82719a53e4e067be592c3.tar.gz
Use jsonutils to load adapter response
This is not technically needed, however we and the libraries we use, aren't very good about keeping our strings and bytes straight for python 3. jsonutils has an attempt to decode stage that means we can let it manage the correct types. Change-Id: I2caf4a5b9a04495aa0286f2b6e3193a17ff246e5
Diffstat (limited to 'keystoneclient/adapter.py')
-rw-r--r--keystoneclient/adapter.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/keystoneclient/adapter.py b/keystoneclient/adapter.py
index 6e5af48..1018b02 100644
--- a/keystoneclient/adapter.py
+++ b/keystoneclient/adapter.py
@@ -10,6 +10,7 @@
# License for the specific language governing permissions and limitations
# under the License.
+from keystoneclient.openstack.common import jsonutils
from keystoneclient import utils
@@ -108,7 +109,7 @@ class LegacyJsonAdapter(Adapter):
body = None
if resp.text:
try:
- body = resp.json()
+ body = jsonutils.loads(resp.text)
except ValueError:
pass