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

Fix variable initialization and simplify logic.

git-svn-id: https://svn.erp5.org/repos/neo/trunk@1407 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 7a8cbed0
...@@ -64,12 +64,9 @@ class PrimaryBootstrapHandler(AnswerBaseHandler): ...@@ -64,12 +64,9 @@ class PrimaryBootstrapHandler(AnswerBaseHandler):
for address, uuid in known_master_list: for address, uuid in known_master_list:
n = app.nm.getByAddress(address) n = app.nm.getByAddress(address)
if n is None: if n is None:
app.nm.createMaster(address) n = app.nm.createMaster(address)
if uuid is not None: if uuid is not None and n.getUUID() != uuid:
# If I don't know the UUID yet, believe what the peer n.setUUID(uuid)
# told me at the moment.
if n.getUUID() is None or n.getUUID() != uuid:
n.setUUID(uuid)
if primary_uuid is not None: if primary_uuid is not None:
primary_node = app.nm.getByUUID(primary_uuid) primary_node = app.nm.getByUUID(primary_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