def _get_package_info(self): """ "Private" function that retrieves info about the package. Populates self.package_info, self.id, self.version, self.release, and self.epoch. """ # Get info on the package we want to install. possible_packages = find_package_with_arch(self.server_id, [self.package_name]) # There's a possibility, however slight, that more than one package # may be returned by find_by_packages. If that's the case, we only # want the info about package_name. package_info = None if possible_packages.has_key(self.package_name): for package in possible_packages[self.package_name]: if package[self.name_index] == self.package_name: self.package_info = package self.id = package[self.id_index] self.version = package[self.version_index] self.release = package[self.release_index] self.epoch = package[self.epoch_index] self.arch = package[self.arch_index]
def _get_package_info(self): """ "Private" function that retrieves info about the package. Populates self.package_info, self.id, self.version, self.release, and self.epoch. """ #Get info on the package we want to install. possible_packages = find_package_with_arch(self.server_id, [self.package_name]) #There's a possibility, however slight, that more than one package #may be returned by find_by_packages. If that's the case, we only #want the info about package_name. package_info = None if possible_packages.has_key(self.package_name): for package in possible_packages[self.package_name]: if package[self.name_index] == self.package_name: self.package_info = package self.id = package[self.id_index] self.version = package[self.version_index] self.release = package[self.release_index] self.epoch = package[self.epoch_index] self.arch = package[self.arch_index]