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
for node_name in self.t_node:
state, stat = self.zk.get('/nodes/%s/state' % node_name)
node_state = state.decode('ascii')
try:
state, stat = self.zk.get('/nodes/%s/state' % node_name)
node_state = state.decode('ascii')
except:
node_state = 'stop'
if node_state == 'start' and node_name not in self.active_node_list:
self.active_node_list.append(node_name)