#NEWLINE# @ Override ( VirtualMachineManager ) #NEWLINE# @ logged ( 'info' ) #NEWLINE# def is_alive_vm( self ) : #NEWLINE# #INDENT# self . _print ( 'listing vms' ) #NEWLINE# process = subprocess . Popen ( [ self . vboxmanage , '-q' , 'list' , 'runningvms' ] , stdout = subprocess . PIPE , stderr = subprocess . PIPE ) #NEWLINE# process . wait ( ) #NEWLINE# lines = process . stdout . readlines ( ) #NEWLINE# self . _print ( ( 'running: ' + str ( lines ) ) ) #NEWLINE# running = [ line . split ( '"' ) [ 1 ] for line in lines if ( ( len ( line . split ( '"' ) ) > 1 ) and ( not line . startswith ( ' ' ) ) and ( not line . startswith ( 'WARN' ) ) and ( not line . startswith ( '\t' ) ) ) ] #NEWLINE# self . _print ( ( 'Running parsed: %s' % running ) ) #NEWLINE# return ( self . vm_name in running )