File tree Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Expand file tree Collapse file tree 1 file changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -480,9 +480,23 @@ def wait_for_status(
480
480
:returns True/False if status was found within timeout_secs. May raise APIException.
481
481
"""
482
482
cluster_status = [K8sClusterStatus [s ] for s in status ]
483
- get_client ().k8s_cluster .wait_for_status (
484
- k8scluster_id = k8scluster_id , status = cluster_status ,
485
- )
483
+
484
+ try :
485
+ success = get_client ().k8s_cluster .wait_for_status (
486
+ k8scluster_id = k8scluster_id ,
487
+ status = cluster_status ,
488
+ timeout_secs = timeout_secs ,
489
+ )
490
+ except :
491
+ success = False
492
+
493
+ if not success :
494
+ print (
495
+ "Failed to reach state(s) {} in {}" .format (
496
+ str (status ), str (timeout_secs ),
497
+ )
498
+ )
499
+ sys .exit (1 )
486
500
487
501
def statuses (self ,):
488
502
"""Return a list of valid statuses"""
You can’t perform that action at this time.
0 commit comments