示例#1
0
 def completed_step(self, id, phase, stdout, stderr, exitcode):
     try:
         method = get_dlp_method(phase)
     except KeyError:
         logging.getLogger().warn("Method %s not declared" % phase)
         return False
     else:
         return xmlrpcCleanup(MscDispatcher().run_proxymethod(
             "dlp", id, method, (exitcode, stdout, stderr), True))
示例#2
0
文件: gateway.py 项目: pruebagit/mmc
 def completed_step(self, id, phase, stdout, stderr, exitcode):
     try:
         method = get_dlp_method(phase)
     except KeyError:
         logging.getLogger().warn("Method %s not declared" % phase)
         return False
     else :
         return xmlrpcCleanup(MscDispatcher().run_proxymethod("dlp",
                                            id,
                                            method,
                                            (exitcode, stdout, stderr),
                                            True
                                            ))
示例#3
0
文件: xmlrpc.py 项目: gnumaniac/pulse
    def _cbRender(self, result, request, func, args):
        if isinstance(result, ForwardingProxy):
            result = xmlrpcCleanup(result.result)
        if not isinstance(result, xmlrpclib.Fault):
            result = (result, )
        self.logger.debug('xmlrpc: %s%s => %s' % (func, (args), (result)))

        try:
            s = xmlrpclib.dumps(result, methodresponse=1)
        except:
            f = xmlrpclib.Fault(self.FAILURE, "can't serialize output")
            s = xmlrpclib.dumps(f, methodresponse=1)
        request.setHeader("content-length", str(len(s)))
        try:
            request.write(s)
            if not request.finished:
                request.finish()
        except Exception, e:
            self.logger.debug("XMLRPC Proxy : request finish: %s" % str(e))
示例#4
0
文件: xmlrpc.py 项目: AnatomicJC/mmc
    def _cbRender(self, result, request, func, args):
        if isinstance(result, ForwardingProxy):
            result = xmlrpcCleanup(result.result)
        if not isinstance(result, xmlrpclib.Fault):
            result = (result,)
        self.logger.debug('xmlrpc: %s%s => %s' % (func, (args), (result)))

        try:
            s = xmlrpclib.dumps(result, methodresponse=1)
        except:
            f = xmlrpclib.Fault(self.FAILURE, "can't serialize output")
            s = xmlrpclib.dumps(f, methodresponse=1)
        request.setHeader("content-length", str(len(s)))
        try:
            request.write(s)
            if not request.finished :
                request.finish()
        except Exception, e :
            self.logger.debug("XMLRPC Proxy : request finish: %s" % str(e))