We should be able to retry on timeouts, too.
Works around connection-limited ftpds, that
may block for too long.
---
 yum/yumRepo.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/yum/yumRepo.py b/yum/yumRepo.py
index 961717d..770dac2 100644
--- a/yum/yumRepo.py
+++ b/yum/yumRepo.py
@@ -632,8 +632,9 @@ class YumRepository(Repository, config.RepoConf):
         def mirror_failure(obj):
             action = {}
 
-            # special handling of 503 errors
-            if getattr(obj.exception, 'code', 0) == 503:
+            # timeouts and 503 errors may retry
+            e = obj.exception
+            if e.errno == 12 or getattr(e, 'code', 0) == 503:
                 tries = getattr(obj, 'tries', self.retries)
                 if tries <= self.retries - len(self.urls):
                     # don't remove this mirror yet
-- 
1.7.11.7

_______________________________________________
Yum-devel mailing list
[email protected]
http://lists.baseurl.org/mailman/listinfo/yum-devel

Reply via email to