shaifali

Zaqar-Exception 504 handling

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