Ensure health value is an int properly

This commit is contained in:
Joshua Boniface 2023-12-13 14:34:02 -05:00
parent 38e43b46c3
commit f41c5176be
1 changed files with 3 additions and 1 deletions

View File

@ -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