Commit c79c38fa authored by Grégory Wisniewski's avatar Grégory Wisniewski

Add some docstring.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1827 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 4865e8f6
...@@ -78,16 +78,25 @@ class Node(object): ...@@ -78,16 +78,25 @@ class Node(object):
return self._uuid return self._uuid
def onConnectionClosed(self): def onConnectionClosed(self):
"""
Callback from node's connection when closed
"""
assert self._connection is not None assert self._connection is not None
self._connection = None self._connection = None
def setConnection(self, connection): def setConnection(self, connection):
"""
Define the connection that is currently available to this node.
"""
assert connection is not None assert connection is not None
assert self._connection is None assert self._connection is None
self._connection = connection self._connection = connection
connection.setOnClose(self.onConnectionClosed) connection.setOnClose(self.onConnectionClosed)
def getConnection(self): def getConnection(self):
"""
Returns the connection to the node if available
"""
assert self._connection is not None assert self._connection is not None
return self._connection return self._connection
......
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