def __generateMapper(self):
Partitions = self.__readPartitions()
i = 0
for p in Partitions.keys():
endPoints = Partitions[p]
if os.path.exists(self.list_file):
for i in range(int(endPoints[0]), int(endPoints[1]) + 1):
ip = linecache.getline(self.list_file, i).strip().strip(',')
(self.__IpMapDict)[ip] = endPoints[2]
else:
print('*** The file \'' + self.list_file + '\' could not be read\n')
raise IOError('The file \'' + self.list_file + '\' could not be read\n')
评论列表
文章目录