#NEWLINE# def _parse_sibling( self , sibling , headers , data ) : #NEWLINE# #INDENT# '\n        Parses a single sibling out of a response.\n        ' #NEWLINE# sibling . exists = True #NEWLINE# for ( header , value ) in headers : #NEWLINE# #INDENT# header = header . lower ( ) #NEWLINE# if ( header == 'content-type' ) : #NEWLINE# #INDENT# ( sibling . content_type , sibling . charset ) = self . _parse_content_type ( value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( header == 'etag' ) : #NEWLINE# #INDENT# sibling . etag = value #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( header == 'link' ) : #NEWLINE# #INDENT# sibling . links = self . _parse_links ( value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( header == 'last-modified' ) : #NEWLINE# #INDENT# sibling . last_modified = mktime_tz ( parsedate_tz ( value ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if header . startswith ( 'x-riak-meta-' ) : #NEWLINE# #INDENT# metakey = header . replace ( 'x-riak-meta-' , '' ) #NEWLINE# sibling . usermeta [ metakey ] = value #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if header . startswith ( 'x-riak-index-' ) : #NEWLINE# #INDENT# field = header . replace ( 'x-riak-index-' , '' ) #NEWLINE# reader = csv . reader ( [ value ] , skipinitialspace = True ) #NEWLINE# for line in reader : #NEWLINE# #INDENT# for token in line : #NEWLINE# #INDENT# token = decode_index_value ( field , token ) #NEWLINE# sibling . add_index ( field , token ) #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( header == 'x-riak-deleted' ) : #NEWLINE# #INDENT# sibling . exists = False #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# sibling . encoded_data = data #NEWLINE# return sibling