#NEWLINE# def complete( self ) : #NEWLINE# #INDENT# "Marks this logic block as complete. Posts the 'events_when_complete'\n        events and optionally restarts this logic block or disables it,\n        depending on this block's configuration settings.\n        " #NEWLINE# self . log . debug ( 'Complete' ) #NEWLINE# if self . config [ 'events_when_complete' ] : #NEWLINE# #INDENT# for event in event . config [ 'events_when_complete' ] : #NEWLINE# #INDENT# self . machine . events . post ( event ) #NEWLINE# #UNINDENT# #UNINDENT# if self . config [ 'restart_on_complete' ] : #NEWLINE# #INDENT# self . reset ( ) #NEWLINE# self . enable ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if self . config [ 'disable_on_complete' ] : #NEWLINE# #INDENT# self . disable ( )