Blame SOURCES/BZ-1377328-_metadata_cache_req.patch

d2a170
commit 673ceee5f3d32fc6397e9a280ac18926e82ac152
d2a170
Author: Valentina Mukhamedzhanova <vmukhame@redhat.com>
d2a170
Date:   Mon Sep 19 17:38:08 2016 +0200
d2a170
d2a170
    Check for _metadata_cache_req properly.
d2a170
d2a170
diff --git a/yum/yumRepo.py b/yum/yumRepo.py
d2a170
index 2db8faf..47f950b 100644
d2a170
--- a/yum/yumRepo.py
d2a170
+++ b/yum/yumRepo.py
d2a170
@@ -1473,7 +1473,8 @@ Insufficient space in download directory %s
d2a170
             else:
d2a170
                 result = self._getFileRepoXML(local, text)
d2a170
                 if result is None:
d2a170
-                    if self.skip_if_unavailable and self._metadata_cache_req in ('write', 'read-only:future'):
d2a170
+                    if (self.skip_if_unavailable and hasattr(self, '_metadata_cache_req')
d2a170
+                        and self._metadata_cache_req in ('write', 'read-only:future')):
d2a170
                         # Since skip_if_unavailable=True, we can just disable this repo
d2a170
                         raise Errors.RepoError, "Can't download repomd.xml for %s" % self.ui_id
d2a170