#NEWLINE# def _add_links_for_riak_object( self , robject , headers ) : #NEWLINE# #INDENT# links = robject . links #NEWLINE# if links : #NEWLINE# #INDENT# current_header = '' #NEWLINE# for link in links : #NEWLINE# #INDENT# header = self . _to_link_header ( link ) #NEWLINE# if ( len ( ( current_header + header ) ) > MAX_LINK_HEADER_SIZE ) : #NEWLINE# #INDENT# headers . add ( 'Link' , current_header ) #NEWLINE# current_header = '' #NEWLINE# #UNINDENT# if ( current_header != '' ) : #NEWLINE# #INDENT# header = ( ', ' + header ) #NEWLINE# #UNINDENT# current_header += header #NEWLINE# #UNINDENT# headers . add ( 'Link' , current_header ) #NEWLINE# #UNINDENT# return headers