RepoConfig: ignore missing name if no location
authorZac Medico <zmedico@gentoo.org>
Fri, 8 Jul 2011 16:36:17 +0000 (09:36 -0700)
committerZac Medico <zmedico@gentoo.org>
Fri, 8 Jul 2011 16:36:17 +0000 (09:36 -0700)
This happens if there is an orphan entry in repos.conf.

pym/portage/repository/config.py

index 38ed6a16da7741170a37d57df1b229fbb36f6b0f..4461901a470c76da366e6561e2b22765bfee010d 100644 (file)
@@ -290,7 +290,9 @@ class RepoConfigLoader(object):
                ignored_repos = tuple((repo_name, tuple(paths)) \
                        for repo_name, paths in ignored_map.items())
 
-               self.missing_repo_names = frozenset(repo.location for repo in prepos.values() if repo.missing_repo_name)
+               self.missing_repo_names = frozenset(repo.location
+                       for repo in prepos.values()
+                       if repo.location is not None and repo.missing_repo_name)
 
                #Parse layout.conf and read masters key.
                for repo in prepos.values():