#NEWLINE# def pause_main( args ) : #NEWLINE# #INDENT# programs = cli . select_programs ( args , filter_paused = False ) #NEWLINE# programs = cli . filter_programs ( programs , ( lambda p : p . is_paused ) , 'Pausing' , 'paused' ) #NEWLINE# if ( not programs ) : #NEWLINE# #INDENT# return #NEWLINE# #UNINDENT# for prog in programs : #NEWLINE# #INDENT# log . info ( ( 'Pausing program %s' % prog . name ) ) #NEWLINE# if prog . is_running : #NEWLINE# #INDENT# log . warn ( ( '%s is running and will not restart on system reboot' % prog . name ) ) #NEWLINE# #UNINDENT# prog . state . update ( paused = True )