#NEWLINE# def _protocol_to_value( self , protocol ) : #NEWLINE# #INDENT# non_standard_protocols = { #NEWLINE# #INDENT# 'imapv2' : 'IMAPv2' , #NEWLINE# 'imapv3' : 'IMAPv3' , #NEWLINE# 'imapv4' : 'IMAPv4' , #NEWLINE# #UNINDENT# } #NEWLINE# protocol_name = protocol . lower ( ) #NEWLINE# if ( protocol_name in non_standard_protocols ) : #NEWLINE# #INDENT# protocol_value = protocol_value [ protocol_name ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# protocol_value = protocol . upper ( ) #NEWLINE# #UNINDENT# return protocol_value