[yum-commits] yum/repos.py
zpavlas at osuosl.org
zpavlas at osuosl.org
Thu Jul 26 13:26:42 UTC 2012
yum/repos.py | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
New commits:
commit 361ae8a6d9c79329de1ee4b402182953db07a97f
Author: ZdenÄk Pavlas <zpavlas at redhat.com>
Date: Thu Jul 26 15:22:34 2012 +0200
retrieveAllMD: honor skip_if_unavailable. BZ 842031
repomd.xml downloads are blocking and raise exceptions.
diff --git a/yum/repos.py b/yum/repos.py
index 3cbbe25..97fa71e 100644
--- a/yum/repos.py
+++ b/yum/repos.py
@@ -80,7 +80,14 @@ class RepoStorage:
for repo in self.listEnabled():
if repo.cache:
continue
- if repo._async and repo._commonLoadRepoXML(repo):
+ try:
+ dl = repo._async and repo._commonLoadRepoXML(repo)
+ except Errors.RepoError, e:
+ if not repo.skip_if_unavailable:
+ raise
+ self.disableRepo(repo.id)
+ dl = False
+ if dl:
mdtypes = repo._mdpolicy2mdtypes()
downloading = repo._commonRetrieveDataMD_list(mdtypes)
repos.append((repo, downloading, [False]))
More information about the Yum-commits
mailing list