#NEWLINE# def sleep_until( self , status , timeoutSec = 600 ) : #NEWLINE# #INDENT# Util . validate_type ( status , 'str' ) #NEWLINE# Util . validate_type ( timeoutSec , 'int' ) #NEWLINE# step = 10 #NEWLINE# while ( 0 < timeoutSec ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# self . reload ( ) #NEWLINE# #UNINDENT# except saklient . errors . httpexception . HttpException : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# s = self . get_status ( ) #NEWLINE# if ( s is None ) : #NEWLINE# #INDENT# s = EServerInstanceStatus . down #NEWLINE# #UNINDENT# if ( s == status ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# timeoutSec -= step #NEWLINE# if ( 0 < timeoutSec ) : #NEWLINE# #INDENT# Util . sleep ( timeoutSec ) #NEWLINE# #UNINDENT# #UNINDENT# return False