Ejemplo n.º 1
0
 def process_response(s):
     try:
         response = json.loads(s)
     except ValueError:
         raise e.get_error(None)
     if 'error' in response:
         print "Got this backend error message %s" % response
         log.err("Got this backend error message %s" % response)
         raise e.get_error(response['error'])
     return response
Ejemplo n.º 2
0
 def process_response(s):
     # If empty string then don't parse it.
     if not s:
         return
     try:
         response = json.loads(s)
     except ValueError:
         raise e.get_error(None)
     if 'error' in response:
         log.debug("Got this backend error message %s" % response)
         raise e.get_error(response['error'])
     return response
Ejemplo n.º 3
0
 def process_response(s):
     # If empty string then don't parse it.
     if not s:
         return
     try:
         response = json.loads(s)
     except ValueError:
         raise e.get_error(None)
     if 'error' in response:
         log.debug("Got this backend error message %s" % response)
         raise e.get_error(response['error'])
     return response