#NEWLINE# def update( ) : #NEWLINE# #INDENT# '\n    Update the cache file for the bucket.\n    ' #NEWLINE# metadata = _init ( ) #NEWLINE# if S3_SYNC_ON_UPDATE : #NEWLINE# #INDENT# log . info ( 'Syncing local cache from S3...' ) #NEWLINE# for ( saltenv , env_meta ) in six . iteritems ( metadata ) : #NEWLINE# #INDENT# for ( bucket , files ) in six . iteritems ( _find_files ( env_meta ) ) : #NEWLINE# #INDENT# for file_path in files : #NEWLINE# #INDENT# cached_file_path = _get_cached_file_name ( env_meta , saltenv , file_path ) #NEWLINE# log . info ( '{0} - {1} : {2}' . format ( bucket , saltenv , file_path ) ) #NEWLINE# _get_file_from_s3 ( metadata , saltenv , bucket , file_path , cached_file_path ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# log . info ( 'Sync local cache from S3 completed.' )