Commit 1a4eff54 authored by Aurel's avatar Aurel

fix issue when getServer return None


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@108 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent 536af589
......@@ -231,7 +231,17 @@ class ServiceEventHandler(MasterEventHandler):
# Send the information.
node_list = []
for n in app.nm.getNodeList():
ip_address, port = n.getServer()
addr = n.getServer()
if addr is None:
ip_address, port = None, None
else:
ip_address, port = addr
if ip_address is None:
ip_address = '0.0.0.0'
if port is None:
port = 0
node_list.append((n.getNodeType(), ip_address, port,
n.getUUID() or INVALID_UUID, n.getState()))
if len(node_list) == 10000:
......
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