Skip to content

Commit e0ac9e1

Browse files
committed
make _get_phase more robust
Signed-off-by: Matthias Büchse <[email protected]>
1 parent 9ecdc62 commit e0ac9e1

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Tests/kaas/plugin/plugin_clusterstacks.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ def _get_condition_ready(self, co_api: _csh.CustomObjectsApi):
3535

3636
def _get_phase(self, co_api: _csh.CustomObjectsApi):
3737
try:
38-
return _csh.get_cluster_status(co_api, self.namespace, self.name)['status'].get('phase', 'n/a')
38+
status = _csh.get_cluster_status(co_api, self.namespace, self.name).get('status', {})
39+
return status.get('phase', 'n/a')
3940
except ApiException as e:
4041
if e.status != 404:
4142
raise

0 commit comments

Comments
 (0)