Commit 762da524 authored by Vincent Pelletier's avatar Vincent Pelletier

Only update node address and UUID when they actually change.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@2048 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 961d69dc
...@@ -63,6 +63,8 @@ class Node(object): ...@@ -63,6 +63,8 @@ class Node(object):
self._manager._updateState(self, old_state) self._manager._updateState(self, old_state)
def setAddress(self, address): def setAddress(self, address):
if self._address == address:
return
old_address = self._address old_address = self._address
self._address = address self._address = address
self._manager._updateAddress(self, old_address) self._manager._updateAddress(self, old_address)
...@@ -71,6 +73,8 @@ class Node(object): ...@@ -71,6 +73,8 @@ class Node(object):
return self._address return self._address
def setUUID(self, uuid): def setUUID(self, uuid):
if self._uuid == uuid:
return
old_uuid = self._uuid old_uuid = self._uuid
self._uuid = uuid self._uuid = uuid
self._manager._updateUUID(self, old_uuid) self._manager._updateUUID(self, old_uuid)
......
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