portage.repository.config.RepoConfigLoader: Add __setitem__() and __delitem__().
authorArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Mon, 24 Jun 2013 19:44:30 +0000 (21:44 +0200)
committerArfrever Frehtes Taifersar Arahesis <Arfrever@Apache.Org>
Mon, 24 Jun 2013 19:44:30 +0000 (21:44 +0200)
pym/portage/repository/config.py

index 304335ed4051e1d963a3efb15c3b8c987ff3ab7b..0a2dd006600b8763eabd526ff18afb631af867ad 100644 (file)
@@ -783,9 +783,15 @@ class RepoConfigLoader(object):
        def get_repo_for_location(self, location):
                return self.prepos[self.get_name_for_location(location)]
 
+       def __setitem__(self, repo_name, repo):
+               self.prepos[repo_name] = repo
+
        def __getitem__(self, repo_name):
                return self.prepos[repo_name]
 
+       def __delitem__(self, repo_name):
+               del self.prepos[repo_name]
+
        def __iter__(self):
                for repo_name in self.prepos_order:
                        yield self.prepos[repo_name]