Fix python 3.x compatibility regarding json loading

Error on travis-ci was:

    TypeError: can't use a string pattern on a bytes-like object
This commit is contained in:
Jean-Baptiste Barth 2015-11-03 09:19:03 +01:00
parent 2cd3d5fb45
commit c0b4aadd92

View File

@ -48,7 +48,7 @@ class SWFResponse(BaseResponse):
# SWF parameters are passed through a JSON body, so let's ease retrieval
@property
def _params(self):
return json.loads(self.body)
return json.loads(self.body.decode("utf-8"))
def _list_types(self, kind):
domain_name = self._params["domain"]