#NEWLINE# def update_metadata_info( metadata , new_metadata , write = True ) : #NEWLINE# #INDENT# "Updates important metadata informations, e.g. on upload ending or\n    change detection. We sometimes don't want to write immediately, e.g. when\n    plug.update_file is called right after." #NEWLINE# metadata . size = new_metadata [ 'bytes' ] #NEWLINE# metadata . extra [ 'rev' ] = new_metadata [ 'rev' ] #NEWLINE# metadata . extra [ 'modified' ] = new_metadata [ 'modified' ] #NEWLINE# if write : #NEWLINE# #INDENT# metadata . write ( )