dpolovinkin / rpms / anaconda

Forked from rpms/anaconda 3 years ago
Clone
Blob Blame History Raw
diff -uNr anaconda-21.48.22.56__orig/pyanaconda/packaging/yumpayload.py anaconda-21.48.22.56/pyanaconda/packaging/yumpayload.py
--- anaconda-21.48.22.56__orig/pyanaconda/packaging/yumpayload.py       2015-12-08 14:36:52.533000000 +0000
+++ anaconda-21.48.22.56/pyanaconda/packaging/yumpayload.py     2015-12-08 14:38:51.464000000 +0000
@@ -648,6 +648,10 @@
                     # so that unattended installations on unreliable networks have
                     # a higher chance of finishing successfully
                     xdelay = xprogressive_delay()
+                    if not nm_is_connected():
+                      MAX_METADATA_DOWNLOAD_RETRIES = 1
+                    else:
+                      MAX_METADATA_DOWNLOAD_RETRIES = 10
                     for retry_count in xrange(0, MAX_METADATA_DOWNLOAD_RETRIES + 1):
                         if retry_count > 0:
                             # introduce a retry delay