Commit 16a7b5d4 authored by Aurel's avatar Aurel

reset master node index if index value is not valid


git-svn-id: https://svn.erp5.org/repos/neo/branches/prototype3@229 71dcc9de-d417-0410-9af5-da40c76e7ee4
parent dd8c2c46
......@@ -69,7 +69,11 @@ class Dispatcher(Thread):
app.local_var.node_not_ready = 0
if app.primary_master_node is None:
# Try with master node defined in config
addr, port = app.master_node_list[master_index].split(':')
try:
addr, port = app.master_node_list[master_index].split(':')
except IndexError:
master_index = 0
addr, port = app.master_node_list[master_index].split(':')
port = int(port)
else:
addr, port = app.primary_master_node.getServer()
......
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