Don't override flush state on exit

This commit is contained in:
Joshua Boniface 2018-06-04 02:35:41 -04:00
parent c0c84036c3
commit eb9ef43957
1 changed files with 2 additions and 1 deletions

View File

@ -46,7 +46,8 @@ def cleanup():
t_node[myhostname].stop() t_node[myhostname].stop()
time.sleep(0.2) time.sleep(0.2)
try: try:
zk.set('/nodes/' + myhostname + '/state', 'stop'.encode('ascii')) if t_node[myhostname].getstate() != 'flush':
zk.set('/nodes/' + myhostname + '/state', 'stop'.encode('ascii'))
zk.stop() zk.stop()
zk.close() zk.close()
except: except: