shaifali

zaqar exception fix

Nov 5th, 2014
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.29 KB | None | 0 0
  1. @property
  2. def deserialized_content(self):
  3. if self.status_code != 200 or self.header['Content-Type'] != 'application/json':
  4. raise Exception
  5. if not self._deserialized and self.content:
  6. self._deserialized = json.loads(self.content)
  7. return self._deserialized
Advertisement
Add Comment
Please, Sign In to add comment