From f41c5176beb22a4bce515449c9e73e20b317f1ef Mon Sep 17 00:00:00 2001 From: "Joshua M. Boniface" Date: Wed, 13 Dec 2023 14:34:02 -0500 Subject: [PATCH] Ensure health value is an int properly --- daemon-common/cluster.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/daemon-common/cluster.py b/daemon-common/cluster.py index 5f118b4f..e2872fa8 100644 --- a/daemon-common/cluster.py +++ b/daemon-common/cluster.py @@ -241,7 +241,9 @@ def getNodeHealth(zkhandler, node_list): node_health_messages.append(f"'{entry['name']}': {entry['message']}") node_health_entry = { - "health": int(node_health_value), + "health": int(node_health_value) + if isinstance(node_health_value, int) + else node_health_value, "messages": node_health_messages, } node_health[node] = node_health_entry