[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH 1/3] Don't immediately retry on downloading a package.



Resolves: rhbz#544323
---
 yuminstall.py |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/yuminstall.py b/yuminstall.py
index 31ef782..39e705d 100644
--- a/yuminstall.py
+++ b/yuminstall.py
@@ -17,6 +17,7 @@ import os.path
 import shutil
 import timer
 import warnings
+import time
 import types
 import glob
 import re
@@ -639,6 +640,14 @@ class AnacondaYum(YumSorter):
     def urlgrabberFailureCB (self, obj, *args, **kwargs):
         log.warning("Try %s/%s for %s failed" % (obj.tries, obj.retry, obj.url))
 
+        delay = 0.25*(2**(obj.tries-1))
+        if delay > 1:
+            w = self.anaconda.intf.waitWindow(_("Retrying"), _("Retrying package download..."))
+            time.sleep(delay)
+            w.pop()
+        else:
+            time.sleep(delay)
+
     def getDownloadPkgs(self):
         downloadpkgs = []
         totalSize = 0
-- 
1.7.1.1


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]