Skip to content

Commit 6059481

Browse files
committed
be more defensive about existence of phase
Signed-off-by: Matthias Büchse <[email protected]>
1 parent 201f77c commit 6059481

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Tests/kaas/plugin/plugin_clusterstacks.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ def __init__(self, namespace: str, name: str):
2525

2626
def _get_phase(self, co_api: _csh.CustomObjectsApi):
2727
try:
28-
return _csh.get_cluster_status(co_api, self.namespace, self.name)['status']['phase']
28+
return _csh.get_cluster_status(co_api, self.namespace, self.name)['status'].get('phase', 'n/a')
2929
except ApiException as e:
3030
if e.status != 404:
3131
raise

0 commit comments

Comments
 (0)