etcd3ref/client.py
def status(self):
        """Get the status of the responding member."""
        try:
            status_response = self.__status()
        except _InactiveRpcError as e:
            print("Exception {} happened, try to reconnect \n".format(e))
            self.reconnect()
            status_response = self.__status()

        for m in self.members:
            if m.id == status_response.leader:
                leader = m
                break
        else:
            # raise exception?
            leader = None

        return Status(status_response.version,
                      status_response.dbSize,
                      leader,
                      status_response.raftIndex,
                      status_response.raftTerm)
Get the status of the responding member.
Get the status of the responding member.
Get the status of the responding member .
def status(self):
        try:
            status_response = self.__status()
        except _InactiveRpcError as e:
            print("Exception {} happened, try to reconnect \n".format(e))
            self.reconnect()
            status_response = self.__status()
        for m in self.members:
            if m.id == status_response.leader:
                leader = m
                break
        else:
            leader = None
        return Status(status_response.version,
                      status_response.dbSize,
                      leader,
                      status_response.raftIndex,
                      status_response.raftTerm)
def status ( self ) : try : status_response = self . __status ( ) except _InactiveRpcError as e : print ( "Exception {} happened, try to reconnect \n" . format ( e ) ) self . reconnect ( ) status_response = self . __status ( ) for m in self . members : if m . id == status_response . leader : leader = m break else : leader = None return Status ( status_response . version , status_response . dbSize , leader , status_response . raftIndex , status_response . raftTerm )
Get the status of the responding member.
Get the status of the responding member .
"""Get the status of the responding member.""" # raise exception?
self