Commit 0ae50a9f authored by Vincent Pelletier's avatar Vincent Pelletier

Output logs in supposed-to-not-happen cases.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2050 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 16340bad
......@@ -263,6 +263,7 @@ class NodeManager(object):
def add(self, node):
if node in self._node_set:
logging.warning('adding a known node %r, ignoring', node)
return
self._node_set.add(node)
self._updateAddress(node, None)
......@@ -272,7 +273,8 @@ class NodeManager(object):
self._updateIdentified(node)
def remove(self, node):
if node is None or node not in self._node_set:
if node not in self._node_set:
logging.warning('removing unknown node %r, ignoring', node)
return
self._node_set.remove(node)
self.__drop(self._address_dict, node.getAddress())
......
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