#NEWLINE# def run( self ) : #NEWLINE# #INDENT# '\n        fetch artefacts\n        ' #NEWLINE# source_path = self . workflow . source . path #NEWLINE# sources_file_path = os . path . join ( source_path , 'sources' ) #NEWLINE# artefacts = '' #NEWLINE# try : #NEWLINE# #INDENT# with open ( sources_file_path , 'r' ) as f : #NEWLINE# #INDENT# artefacts = f . read ( ) #NEWLINE# self . log . info ( 'sources file:\n%s' , artefacts ) #NEWLINE# #UNINDENT# #UNINDENT# except IOError as ex : #NEWLINE# #INDENT# if ( ex . errno == 2 ) : #NEWLINE# #INDENT# self . log . info ( 'no sources file' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# cur_dir = os . getcwd ( ) #NEWLINE# os . chdir ( source_path ) #NEWLINE# subprocess . check_call ( self . command . split ( ) ) #NEWLINE# os . chdir ( cur_dir ) #NEWLINE# #UNINDENT# return artefacts