From 505a951a7ddfdc3dc1718a415a5f32c1127020e5 Mon Sep 17 00:00:00 2001 From: Joshua Boniface Date: Sun, 30 Sep 2018 02:52:22 -0400 Subject: [PATCH] Add delete function to zkhandler --- daemon-common/daemon_lib/zkhandler.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/daemon-common/daemon_lib/zkhandler.py b/daemon-common/daemon_lib/zkhandler.py index a590add6..690aa770 100644 --- a/daemon-common/daemon_lib/zkhandler.py +++ b/daemon-common/daemon_lib/zkhandler.py @@ -28,6 +28,10 @@ def listchildren(zk_conn, key): children = zk_conn.get_children(key) return children +# Key deletion function +def delete(zk_conn, key): + zk_conn.delete(key, recursive=True) + # Data read function def readdata(zk_conn, key): data_raw = zk_conn.get(key)