def METHOD_NAME(self, timeout = 15):
    daemon = jsonrpclib.Server('http://127.0.0.1:%s/' % self.port, timeout = timeout)
    poll_rate = 0.1
    for i in range(int(timeout/poll_rate)):
        try:
            daemon.METHOD_NAME()
            return True
        except socket.error: # daemon is not up yet
            sleep(poll_rate)
    return False