def join(self, remote_address=None): # initially just set successor self.finger_ = [None for x in range(LOGSIZE)] self.predecessor_ = None if remote_address: remote = Remote(remote_address) self.finger_[0] = remote.find_successor(self.id()) else: self.finger_[0] = self self.log("joined")
def join(self, remote_address = None): # initially just set successor self.finger_ = list(map(lambda x: None, range(LOGSIZE))) self.predecessor_ = None if remote_address: remote = Remote(remote_address) self.finger_[0] = remote.find_successor(self.id()) else: self.finger_[0] = self self.log("joined")
def join(self, remote_address = None): # initially just set successor self.finger_ = map(lambda x: None, range(LOGSIZE)) self.predecessor_ = None if remote_address: remote = Remote(remote_address) self.finger_[0] = remote.find_successor(self.id()) else: self.finger_[0] = self self.log("joined")
def join(self, remote_address = None): # initially just set successor print "joining" self.finger_ = [None for x in range(LOGSIZE)] self.predecessor_ = None if remote_address: print "poking", remote_address remote = Remote(remote_address) print "fingering" self.finger_[0] = remote.find_successor(self.id()) else: self.finger_[0] = self print "joined" self.log("joined")