From f27c2c4a455c24c8f2606d17be19b57a5c1ce7d7 Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Wed, 6 Jun 2018 00:49:34 -0400 Subject: [PATCH] Put try around node update get --- NodeInstance.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/NodeInstance.py b/NodeInstance.py index a47bbf73..efcbb078 100644 --- a/NodeInstance.py +++ b/NodeInstance.py @@ -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)