From: Arfrever Frehtes Taifersar Arahesis Date: Mon, 24 Jun 2013 21:45:31 +0000 (+0200) Subject: portage.repository.config.RepoConfigLoader: Fix __delitem__() and unimplement __setit... X-Git-Tag: v2.2.0_alpha186~14 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=c0ae3fb065c21ca857a3f51096adf174570b761b;p=portage.git portage.repository.config.RepoConfigLoader: Fix __delitem__() and unimplement __setitem__(). --- diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py index 0a2dd0066..3d88f4851 100644 --- a/pym/portage/repository/config.py +++ b/pym/portage/repository/config.py @@ -784,13 +784,23 @@ class RepoConfigLoader(object): return self.prepos[self.get_name_for_location(location)] def __setitem__(self, repo_name, repo): - self.prepos[repo_name] = repo + # self.prepos[repo_name] = repo + raise NotImplementedError def __getitem__(self, repo_name): return self.prepos[repo_name] def __delitem__(self, repo_name): + location = self.prepos[repo_name].location del self.prepos[repo_name] + if repo_name in self.prepos_order: + self.prepos_order.remove(repo_name) + for k, v in self.location_map.copy().items(): + if v == repo_name: + del self.location_map[k] + if repo_name in self.treemap: + del self.treemap[repo_name] + self._repo_location_list = tuple(x for x in self._repo_location_list if x != location) def __iter__(self): for repo_name in self.prepos_order: