Revision 2bcb595a kamaki/clients/__init__.py

b/kamaki/clients/__init__.py
46 46
# Add a convenience json property to the responses
47 47
def _json(self):
48 48
    try:
49
        return json.loads(self.content)
49
        return json.loads(self.content) if self.content else {}
50 50
    except ValueError:
51 51
        raise ClientError("Invalid JSON reply", self.status_code)
52 52
requests.Response.json = property(_json)

Also available in: Unified diff