Fix bug with daemon_state

This commit is contained in:
Joshua Boniface 2019-06-19 14:19:00 -04:00
parent 4ca0fe8f6f
commit 39a45a1e0f
1 changed files with 2 additions and 2 deletions

View File

@ -102,7 +102,7 @@ def secondary_node(zk_conn, node):
# Ensure node is in run daemonstate
daemon_state = zkhandler.readdata(zk_conn, '/nodes/{}/daemonstate'.format(node))
if daemon_mode != 'run':
if daemon_state != 'run':
return False, 'ERROR: Node "{}" is not active'.format(node)
# Get current state
@ -129,7 +129,7 @@ def primary_node(zk_conn, node):
# Ensure node is in run daemonstate
daemon_state = zkhandler.readdata(zk_conn, '/nodes/{}/daemonstate'.format(node))
if daemon_mode != 'run':
if daemon_state != 'run':
return False, 'ERROR: Node "{}" is not active'.format(node)
# Get current state