From 1677fae74f63fdbc2c3ec490dac573e45a1736c4 Mon Sep 17 00:00:00 2001 From: Bobbins228 Date: Thu, 18 Jan 2024 09:41:21 +0000 Subject: [PATCH] Added kube exception to is_openshift_cluster --- src/codeflare_sdk/utils/generate_yaml.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/codeflare_sdk/utils/generate_yaml.py b/src/codeflare_sdk/utils/generate_yaml.py index 2d507c8ee..494234fa7 100755 --- a/src/codeflare_sdk/utils/generate_yaml.py +++ b/src/codeflare_sdk/utils/generate_yaml.py @@ -62,9 +62,8 @@ def is_openshift_cluster(): return True else: return False - except client.ApiException as e: # pragma: no cover - print(f"Error detecting cluster type defaulting to Kubernetes: {e}") - return False + except Exception as e: # pragma: no cover + return _kube_api_error_handling(e) def update_dashboard_route(route_item, cluster_name, namespace):