#NEWLINE# def mapping_for_file( self , filename ) : #NEWLINE# #INDENT# 'Get the mapping for a generated filename' #NEWLINE# year = self . _filename_year ( filename ) #NEWLINE# try : #NEWLINE# #INDENT# return next ( ( m for m in self . mappings ( msg ) if ( m [ 'generated_filename' ] == filename ) ) ) #NEWLINE# #UNINDENT# except StopIteration : #NEWLINE# #INDENT# msg = 'Mapping for standardized filename {} could not be found' #NEWLINE# msg = msg . format ( filename ) #NEWLINE# raise LookupError ( msg )