#NEWLINE# def __init__( self , mode , tag_sets = None ) : #NEWLINE# #INDENT# if ( ( mode == _PRIMARY ) and ( tag_sets is not None ) ) : #NEWLINE# #INDENT# raise ConfigurationError ( 'Read preference primary cannot be combined with tags' ) #NEWLINE# #UNINDENT# self . __mongos_mode = _MONGOS_MODES [ mode ] #NEWLINE# self . __mode = mode #NEWLINE# self . __tag_sets = _validate_tag_sets ( tag_sets )