Don't traceback on xml parsing. BZ#1063177 master
authorValentina Mukhamedzhanova <vmukhame@redhat.com>
Tue, 26 May 2015 09:16:00 +0000 (11:16 +0200)
committerValentina Mukhamedzhanova <vmukhame@redhat.com>
Tue, 26 May 2015 09:16:00 +0000 (11:16 +0200)
yum/repos.py

index d5e50ac..a0ef28c 100644 (file)
@@ -381,6 +381,13 @@ class RepoStorage:
             sack = repo.getPackageSack()
             try:
                 sack.populate(repo, mdtype, callback, cacheonly)
+            except TypeError, e:
+                if not e.args[0].startswith('Parsing'):
+                    raise
+                if mdtype in ['all', 'metadata'] and repo.skip_if_unavailable:
+                    self.disableRepo(repo.id)
+                else:
+                    raise Errors.RepoError(e.args[0])
             except Errors.RepoError, e:
                 if mdtype in ['all', 'metadata'] and repo.skip_if_unavailable:
                     self.disableRepo(repo.id)