Exemplo n.º 1
0
    def _cbRender(self, result, request):
        if isinstance(result, Handler):
            result = result.result
        if not isinstance(result, Fault):
            result = (result,)

        try:
            s = ebrpc.dumps(result, methodresponse=1)
        except Exception, e:
            f = Fault(self.FAILURE,
                      "function:%s can't serialize output: %s" %
                      (request.functionPath, str_exc(e)))
            self._err(f)
            s = ebrpc.dumps(f, methodresponse=1)
Exemplo n.º 2
0
 def __init__(self, path, host, method, user=None, password=None, *args):
     self.path = path
     self.host = host
     self.user = user
     self.password = password
     self.method = method
     self.payload = ebrpc.dumps(args, method)
     self.deferred = defer.Deferred()
     self.decode = False