Handle colouring of network lists when a network is invalid

This commit is contained in:
2018-10-20 15:27:07 -04:00
parent 187a572c13
commit a3f7419124
3 changed files with 31 additions and 6 deletions

View File

@ -23,6 +23,14 @@
import kazoo.client
import client_lib.ansiiprint as ansiiprint
# Exists function
def exists(zk_conn, key):
stat = zk_conn.exists(key)
if stat is None:
return False
else:
return True
# Child list function
def listchildren(zk_conn, key):
children = zk_conn.get_children(key)