From e0a7e57e8d2cb7c14b84612c7d90b229c103616a Mon Sep 17 00:00:00 2001 From: Zac Medico Date: Thu, 8 Aug 2013 09:04:36 -0700 Subject: [PATCH] RepoConfigLoader: handle main_repo in __delitem__ This will fix bug #480254. --- pym/portage/repository/config.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pym/portage/repository/config.py b/pym/portage/repository/config.py index 5c37da331..7b49eea7a 100644 --- a/pym/portage/repository/config.py +++ b/pym/portage/repository/config.py @@ -886,6 +886,8 @@ class RepoConfigLoader(object): return self.prepos[repo_name] def __delitem__(self, repo_name): + if repo_name == self.prepos['DEFAULT'].main_repo: + self.prepos['DEFAULT'].main_repo = None location = self.prepos[repo_name].location del self.prepos[repo_name] if repo_name in self.prepos_order: -- 2.26.2