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)