Put try around node update get

This commit is contained in:
Joshua Boniface 2018-06-06 00:49:34 -04:00
parent f2ec143544
commit f27c2c4a45
1 changed files with 5 additions and 2 deletions

View File

@ -178,8 +178,11 @@ class NodeInstance(threading.Thread):
# Update our local node lists # Update our local node lists
for node_name in self.t_node: for node_name in self.t_node:
try:
state, stat = self.zk.get('/nodes/%s/state' % node_name) state, stat = self.zk.get('/nodes/%s/state' % node_name)
node_state = state.decode('ascii') node_state = state.decode('ascii')
except:
node_state = 'stop'
if node_state == 'start' and node_name not in self.active_node_list: if node_state == 'start' and node_name not in self.active_node_list:
self.active_node_list.append(node_name) self.active_node_list.append(node_name)