[master 6/11] Fix crash when mirrorlist checkbox is checked

wgwoods installerbot-noreply at redhat.com
Wed Jul 22 21:32:50 UTC 2015


From: Jiri Konecny <jkonecny at redhat.com>

---
 pyanaconda/ui/gui/spokes/source.py | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index fe423ea..6aec801 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -959,8 +959,11 @@ def _checkURL(self, inputcheck, combo):
         if is_additional_repo:
             # Input object contains repository name
             repo = self._get_repo_by_id(inputcheck.input_obj)
-            protocol = urlsplit(repo.baseurl)[0]
-            url_string = repo.baseurl.strip()[len(protocol) + 3:]
+            protocol = urlsplit(repo.baseurl)[0] # extract protocol part (http, https, nfs...)
+            if repo.mirrorlist:
+                url_string = repo.mirrorlist.strip()[len(protocol) + 3:] # +3 for "://" part
+            else:
+                url_string = repo.baseurl.strip()[len(protocol) + 3:] # +3 for "://" part
         else:
             url_string = self.get_input(inputcheck.input_obj).strip()
             protocol = combo.get_active_id()


-- 
To view this commit on github, visit https://github.com/rhinstaller/anaconda/commit/7ab9c4516e30aedeac77af9e51df2fe082d3b7f7


More information about the anaconda-patches mailing list