#NEWLINE# def wait4tasks( self , tasks , tout = 60 , verbose = False ) : #NEWLINE# #INDENT# running = list ( filter ( self . is_task_running , tasks [ : ] ) ) #NEWLINE# count = 0 #NEWLINE# while running : #NEWLINE# #INDENT# if verbose : #NEWLINE# #INDENT# print ( ( 'Tasks still running after %s seconds' , count ) ) #NEWLINE# print ( running ) #NEWLINE# #UNINDENT# time . sleep ( 1 ) #NEWLINE# count += 1 #NEWLINE# running = list ( filter ( self . is_task_running , running ) ) #NEWLINE# if ( count > tout ) : #NEWLINE# #INDENT# raise HPOneViewTimeout ( 'Waited 60 seconds for task to complete, aborting' )