def create_client(self,methods): try: client_class = ClientXMLRPC.generate(methods) except Exception as e: raise ProtocolErrors.ClientClassCreationError( ("Client class creation exception: %s" % e), e ) try: return client_class(url = self.ip_address, port = self.port, uri = self.uri) except Exception as e: raise ProtocolErrors.ClientInstanciationError(("Unable to instanciate the XMLRPC client: %s" % e),e)
def create_client(self, methods): try: client_class = ClientXMLRPC.generate(methods) except Exception as e: raise ProtocolErrors.ClientClassCreationError( ("Client class creation exception: %s" % e), e) try: return client_class(url=self.ip_address, port=self.port, uri=self.uri) except Exception as e: raise ProtocolErrors.ClientInstanciationError( ("Unable to instanciate the XMLRPC client: %s" % e), e)
def test_generation(self): ClientXMLRPC.generate(["method1"])
def test_generation(self): ClientXMLRPC.generate(['method1'])