Commit f3e9bc85 authored by Vincent Pelletier's avatar Vincent Pelletier

Define a string representation of Node isntances.


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@329 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent c396be67
......@@ -73,6 +73,15 @@ class Node(object):
def getNodeType(self):
raise NotImplementedError
def __str__(self):
server = self.getServer()
if server is None:
address, port = None, None
else:
address, port = server
uuid = self.getUUID()
return '%r:%r (%s)' % (address, port, dump(uuid))
class MasterNode(Node):
"""This class represents a master node."""
def getNodeType(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment