Skip to content

Commit

Permalink
[LIBCLOUD-569] Removing the overloaded constructor from the rimuhosti…
Browse files Browse the repository at this point in the history
…ng base class.

Rimu uses gzip'ed responses but the overloaded constructor was not calling the decompress function resuuulting in a MalformedResponseError. All functionality in overloaded constructor already existed in the base clase.

Closes #303

Signed-off-by: Tomaz Muraus <tomaz@apache.org>
  • Loading branch information
amastracci authored and Kami committed Jun 3, 2014
1 parent e42e878 commit dff5c53
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
5 changes: 5 additions & 0 deletions CHANGES.rst
Expand Up @@ -193,6 +193,11 @@ Compute
(GITHUB-301)
[Csaba Hoch]

- Fix bug in RimuHosting driver which caused driver not to work when the
provider returned compressed (gzip'ed) response.
(LIBCLOUD-569, GITHUB-303)
[amastracci]

Storage
~~~~~~~

Expand Down
13 changes: 3 additions & 10 deletions libcloud/compute/drivers/rimuhosting.py
Expand Up @@ -43,16 +43,9 @@ def __repr__(self):


class RimuHostingResponse(JsonResponse):
def __init__(self, response, connection):
self.body = response.read()
self.status = response.status
self.headers = dict(response.getheaders())
self.error = response.reason
self.connection = connection

if self.success():
self.object = self.parse_body()

"""
Response Class for RimuHosting driver
"""
def success(self):
if self.status == 403:
raise InvalidCredsError()
Expand Down

0 comments on commit dff5c53

Please sign in to comment.