#NEWLINE# def _add_headers_to_message( self , message , headers ) : #NEWLINE# #INDENT# for header in headers : #NEWLINE# #INDENT# if ( ( header [ 1 ] is None ) or ( isinstance ( header [ 1 ] , list ) and ( not header [ 1 ] ) ) ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# ( name , value ) = header #NEWLINE# if isinstance ( value , ( Address , AddressList ) ) : #NEWLINE# #INDENT# value = unicode ( value ) #NEWLINE# #UNINDENT# message [ name ] = value