[master 4/5] Fix crash when user start typing proxy credentials

jkonecny12 installerbot-noreply at redhat.com
Tue Jul 14 09:02:45 UTC 2015


From: Jiri Konecny <jkonecny at redhat.com>

ProxyString object for parsing proxy was misused.
When using proxy with username the password is need too and reverse.
---
 pyanaconda/ui/gui/spokes/source.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/pyanaconda/ui/gui/spokes/source.py b/pyanaconda/ui/gui/spokes/source.py
index 8817f18..688bc7c 100644
--- a/pyanaconda/ui/gui/spokes/source.py
+++ b/pyanaconda/ui/gui/spokes/source.py
@@ -1519,7 +1519,10 @@ def on_repoProxy_changed(self, *args):
             self._repoChecks[repo.addon_repo_id].proxy_check.update_check_status()
 
         try:
-            proxy = ProxyString(url=url, username=username, password=password)
+            if username and password:
+                proxy = ProxyString(url=url, username=username, password=password)
+            else:
+                proxy = ProxyString(url=url)
             repo.proxy = proxy.url
         except ProxyStringError as e:
             log.error("Failed to parse proxy - %s:%s@%s: %s", username, password, url, e)


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


More information about the anaconda-patches mailing list