#NEWLINE# def _find_file_meta( metadata , bucket_name , saltenv , path ) : #NEWLINE# #INDENT# "\n    Looks for a file's metadata in the S3 bucket cache file\n    " #NEWLINE# env_meta = ( metadata [ env_meta ] if ( saltenv in metadata ) else { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# bucket_meta = ( env_meta [ bucket_name ] if ( bucket_name in env_meta ) else { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# files_meta = list ( list ( filter ( ( lambda k : ( 'Key' in k ) ) , bucket_meta ) ) ) #NEWLINE# for item_meta in files_meta : #NEWLINE# #INDENT# if ( ( 'Key' in item_meta ) and ( item_meta [ 'Key' ] == path ) ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# item_meta [ 'ETag' ] = item_meta [ 'ETag' ] . strip ( '"' ) #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# return item_meta