def _Open ( self , hostname , port ) : try : self . _xmlrpc_server = SimpleXMLRPCServer . SimpleXMLRPCServer ( ( hostname , port ) , logRequests = False , allow_none = True ) except SocketServer . socket . error as exception : logger . warning ( ( 'Unable to bind a RPC server on {0:s}:{1:d} with error: ' '{2!s}' ) . format ( hostname , port , exception ) ) return False self . _xmlrpc_server . register_function ( self . _callback , self . _RPC_FUNCTION_NAME ) return True
python xmlrpc doesn't work over a network
Opens the RPC communication channel for clients .
def _Open(self, hostname, port):
    """Opens the RPC communication channel for clients.

    Args:
      hostname (str): hostname or IP address to connect to for requests.
      port (int): port to connect to for requests.

    Returns:
      bool: True if the communication channel was successfully opened.
    """
    try:
      self._xmlrpc_server = SimpleXMLRPCServer.SimpleXMLRPCServer(
          (hostname, port), logRequests=False, allow_none=True)
    except SocketServer.socket.error as exception:
      logger.warning((
          'Unable to bind a RPC server on {0:s}:{1:d} with error: '
          '{2!s}').format(hostname, port, exception))
      return False

    self._xmlrpc_server.register_function(
        self._callback, self._RPC_FUNCTION_NAME)
    return True