Blame SOURCES/BZ-1377328-_metadata_cache_req.patch

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