#NEWLINE# def _run( self ) : #NEWLINE# #INDENT# self . o . reset ( ) #NEWLINE# status = self . container . status ( ) #NEWLINE# if ( not self ) : #NEWLINE# #INDENT# if self . _standalone : #NEWLINE# #INDENT# self . o . commit ( CONTAINER_STATUS_FMT . format ( '-' ) ) #NEWLINE# self . o . commit ( blue ( TASK_RESULT_FMT . format ( 'absent' ) ) ) #NEWLINE# #UNINDENT# return #NEWLINE# #UNINDENT# if status [ 'State' ] [ 'Running' ] : #NEWLINE# #INDENT# self . o . commit ( CONTAINER_STATUS_FMT . format ( self . container . shortid_and_tag ) ) #NEWLINE# self . o . commit ( red ( TASK_RESULT_FMT . format ( 'skipped' ) ) ) #NEWLINE# return #NEWLINE# #UNINDENT# self . o . pending ( 'removing container {}...' . format ( self . container . shortid ) ) #NEWLINE# self . container . ship . backend . remove_container ( self . container . id , v = True ) #NEWLINE# if self . _standalone : #NEWLINE# #INDENT# self . o . commit ( CONTAINER_STATUS_FMT . format ( self . container . shortid ) ) #NEWLINE# self . o . commit ( green ( TASK_RESULT_FMT . format ( 'removed' ) ) )