#NEWLINE# def addRemote( self , remote ) : #NEWLINE# #INDENT# '\n        Uniquely add a remote to indexes\n        ' #NEWLINE# if ( ( remote . uid in self . uidRemotes ) or ( remote . uid in ( self . local . uid , ) ) ) : #NEWLINE# #INDENT# emsg = "Cannot add remote at uid '{0}', alreadys exists." . format ( remote . uid ) #NEWLINE# raise ValueError ( emsg ) #NEWLINE# #UNINDENT# if ( ( self . name in self . nameRemotes ) or ( remote . name in ( self . local . name , ) ) ) : #NEWLINE# #INDENT# emsg = "Cannot add remote at name '{0}', alreadys exists." . format ( remote . name ) #NEWLINE# raise ValueError ( emsg ) #NEWLINE# #UNINDENT# if ( ( remote . ha in self . haRemotes ) or ( remote . ha in ( self . local . ha , ) ) ) : #NEWLINE# #INDENT# emsg = "Cannot add remote at ha '{0}', alreadys exists." . format ( remote . ha ) #NEWLINE# raise ValueError ( emsg ) #NEWLINE# #UNINDENT# remote . stack = self #NEWLINE# self . uidRemotes [ remote . uid ] = remote #NEWLINE# self . nameRemotes [ remote . name ] = remote #NEWLINE# self . haRemotes [ remote . ha ] = remote #NEWLINE# return remote