#NEWLINE# def pre_run( self ) : #NEWLINE# #INDENT# chainspec_file = self . entry_point #NEWLINE# LOG . debug ( 'Reading action chain from %s for action %s.' , chainspec_file , self . action ) #NEWLINE# try : #NEWLINE# #INDENT# chainspec = self . _meta_loader . load ( file_path = chainspec_file , expected_type = dict ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# message = ( 'Failed to parse action chain definition from "%s": %s' % ( chainspec_file , str ( e ) ) ) #NEWLINE# LOG . exception ( 'Failed to load action chain definition.' ) #NEWLINE# raise runnerexceptions . ActionRunnerPreRunError ( message ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# self . chain_holder = ChainHolder ( chainspec , e . action_name ) #NEWLINE# #UNINDENT# except json_schema_exceptions . ValidationError as e : #NEWLINE# #INDENT# message = str ( e ) #NEWLINE# LOG . exception ( 'Failed to instantiate ActionChain.' ) #NEWLINE# raise runnerexceptions . ActionRunnerPreRunError ( message ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# message = ( e . message or str ( e ) ) #NEWLINE# LOG . exception ( 'Failed to instantiate ActionChain.' ) #NEWLINE# raise runnerexceptions . ActionRunnerPreRunError ( message ) #NEWLINE# #UNINDENT# if getattr ( self , 'liveaction' , None ) : #NEWLINE# #INDENT# self . _chain_notify = getattr ( self . liveaction , 'notify' , None ) #NEWLINE# #UNINDENT# if self . runner_parameters : #NEWLINE# #INDENT# self . _skip_notify_tasks = self . runner_parameters . get ( 'skip_notify' , [ ] ) #NEWLINE# self . _display_published = self . runner_parameters . get ( 'display_published' , False ) #NEWLINE# #UNINDENT# try : #NEWLINE# #INDENT# self . chain_holder . validate ( ) #NEWLINE# #UNINDENT# except Exception as e : #NEWLINE# #INDENT# raise runnerexceptions . ActionRunnerPreRunError ( e . message )