From 7e2f57c24e75fe7ff11a4ee98c675f59f256abf5 Mon Sep 17 00:00:00 2001 From: Francisco Rivera Date: Sun, 24 Nov 2024 18:16:37 -0300 Subject: [PATCH] removing assert --- leverage/containers/kubectl.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/leverage/containers/kubectl.py b/leverage/containers/kubectl.py index 5edcd43..af131d0 100644 --- a/leverage/containers/kubectl.py +++ b/leverage/containers/kubectl.py @@ -96,8 +96,9 @@ def _scan_clusters(self): try: with open(cluster_file) as cluster_yaml_file: data = ruamel.yaml.safe_load(cluster_yaml_file) - assert data["type"] == "k8s-eks-cluster" - except AssertionError: + if data["type"] != "k8s-eks-cluster": + continue + except KeyError: continue except Exception as exc: logger.warning(exc)