def statestr(self):
        returnstr = ""
        for peer in self.replicas:
            returnstr += node_names[peer.type] + " %s:%d\n" % (peer.addr,peer.port)
        if hasattr(self, 'pendingcommands') and len(self.pendingcommands) > 0:
            pending =  "".join("%d: %s" % (cno, proposal) for cno,proposal \
                                   in self.pendingcommands.iteritems())
            returnstr = "%s\nPending:\n%s" % (returnstr, pending)
        return returnstr
dataset/ETHPy150Open denizalti/concoord/concoord/node.py/Node.statestr/original