[master 5/5] Fix crash when mirrorlist checkbox is checked
jkonecny12
installerbot-noreply at redhat.com
Tue Jul 14 09:02:46 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 688bc7c..f466369 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -948,8 +948,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/efb0151f0464cd6e6ecfbe8b086193320aa8600f
More information about the anaconda-patches
mailing list