Skip to content

Commit

Permalink
not logging error (#129)
Browse files Browse the repository at this point in the history
Signed-off-by: Paige Patton <[email protected]>
  • Loading branch information
paigerube14 authored Oct 8, 2024
1 parent d69a5d0 commit 91edc32
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/krkn_lib/telemetry/ocp/krkn_telemetry_openshift.py
Original file line number Diff line number Diff line change
Expand Up @@ -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[
Expand Down Expand Up @@ -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

0 comments on commit 91edc32

Please sign in to comment.