dpolovinkin / rpms / anaconda

Forked from rpms/anaconda 3 years ago
Clone

Blame SOURCES/anaconda-centos-skip-retry-if-not-connected.patch

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