Skip to content

Commit

Permalink
add try exception
Browse files Browse the repository at this point in the history
Signed-off-by: Oded Viner <[email protected]>
  • Loading branch information
OdedViner committed Feb 24, 2025
1 parent 4c86933 commit 7d160fd
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -305,9 +305,12 @@ def test_monitoring_ipv6(threading_lock):
)
prometheus_pod_obj = None
for pod_obj in pod_obj_list:
if "prometheus-k8s" in pod_obj.name:
prometheus_pod_obj = pod_obj
break
try:
if "prometheus-k8s" in pod_obj.name:
prometheus_pod_obj = pod_obj
break
except Exception as e:
logger.info(e)
assert (
prometheus_pod_obj is not None
), "Prometheus pod not found in the monitoring namespace"
Expand Down

0 comments on commit 7d160fd

Please sign in to comment.