Commit a57e35d2 authored by Vincent Pelletier's avatar Vincent Pelletier

Add sanity check when indexing a node by uuid and address in node manager.

parent 8552935d
......@@ -305,6 +305,8 @@ class NodeManager(object):
del index_dict[old_key]
if new_key is not None:
assert index_dict.get(new_key, node) is node, 'Adding %r at %r ' \
'would overwrite %r' % (node, new_key, index_dict[new_key])
index_dict[new_key] = node
def _updateIdentified(self, node):
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment