From 91edc322c83950248a783ed401118b3832f55c65 Mon Sep 17 00:00:00 2001 From: Paige Patton <64206430+paigerube14@users.noreply.github.com> Date: Tue, 8 Oct 2024 16:10:26 -0400 Subject: [PATCH] not logging error (#129) Signed-off-by: Paige Patton --- src/krkn_lib/telemetry/ocp/krkn_telemetry_openshift.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/krkn_lib/telemetry/ocp/krkn_telemetry_openshift.py b/src/krkn_lib/telemetry/ocp/krkn_telemetry_openshift.py index ed6ee75b..c5fab51e 100644 --- a/src/krkn_lib/telemetry/ocp/krkn_telemetry_openshift.py +++ b/src/krkn_lib/telemetry/ocp/krkn_telemetry_openshift.py @@ -75,6 +75,7 @@ def collect_cluster_metadata(self, chaos_telemetry: ChaosRunTelemetry): chaos_telemetry.network_plugins = ( self.__ocpcli.get_cluster_network_plugins() ) + vm_number = self.get_vm_number() if vm_number > 0: chaos_telemetry.kubernetes_objects_count[ @@ -254,6 +255,7 @@ def get_vm_number(self) -> int: json_obj = ast.literal_eval(data[0]) return len(json_obj["items"]) - except Exception as e: - logging.error(f"failed to parse virtualmachines API: {e}") + except Exception: + logging.info("failed to parse virtualmachines API") return 0 + return 0