Return the entire response in an InvalidResponse

It's much more helpful to return the entire response in an
InvalidResponse. It's already done this way in [1] and [2].

[1] http://git.openstack.org/cgit/stackforge/python-openstacksdk/tree/openstack/auth/identity/v2.py#n95
[2] http://git.openstack.org/cgit/stackforge/python-openstacksdk/tree/openstack/auth/identity/v3.py#n145

Change-Id: I007e0cfa726979a419808d47543a4260f8c3c584
This commit is contained in:
Everett Toews 2015-06-16 15:39:45 -05:00
parent c23fa19457
commit 01e955520c
1 changed files with 1 additions and 1 deletions

View File

@ -273,7 +273,7 @@ class Transport(requests.Session):
except ValueError as e:
# this may be simplejson.decode.JSONDecodeError
# Re-raise into our own exception
raise exceptions.InvalidResponse(response=resp.text)
raise exceptions.InvalidResponse(response=resp)
return resp