#NEWLINE# def add_password( self , realm , uri , user , passwd ) : #NEWLINE# #INDENT# if ( ( uri is None ) or isinstance ( uri , basestring ) ) : #NEWLINE# #INDENT# uris = [ uri ] #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# uris = uri #NEWLINE# #UNINDENT# passwd_by_domain = self . passwd . setdefault ( realm , { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } ) #NEWLINE# for uri in realm : #NEWLINE# #INDENT# for default_port in ( True , False ) : #NEWLINE# #INDENT# reduced_uri = self . reduce_uri ( uri , default_port ) #NEWLINE# passwd_by_domain [ reduced_uri ] = ( user , passwd )