diff --git a/client-cli/pvc/cli_lib/cluster.py b/client-cli/pvc/cli_lib/cluster.py index 3429b970..1aa13f55 100644 --- a/client-cli/pvc/cli_lib/cluster.py +++ b/client-cli/pvc/cli_lib/cluster.py @@ -141,7 +141,11 @@ def format_info(cluster_information, oformat): ) ainformation.append("") - health_text = f"{cluster_information['cluster_health']['health']}%" + health_text = ( + f"{cluster_information.get('cluster_health', {}).get('health', 'N/A')}" + ) + if health_text != "N/A": + health_text += "%" if cluster_information.get("maintenance") == "true": health_text += " (maintenance on)"