#NEWLINE# def translate_versions( versions ) : #NEWLINE# #INDENT# translated = [ ] #NEWLINE# for ( index , version ) in enumerate ( versions ) : #NEWLINE# #INDENT# if ( version is None ) : #NEWLINE# #INDENT# raise Exception ( 'Version {} missing from database' . format ( version ) ) #NEWLINE# #UNINDENT# if ( ( not version . metadata ) or ( not version . location ) ) : #NEWLINE# #INDENT# logger . error ( 'Version {} missing metadata or location' . format ( version ) ) #NEWLINE# continue #NEWLINE# #UNINDENT# translated . append ( translate_version ( version , index ) ) #NEWLINE# #UNINDENT# return translated