Re: [PATCH] Use None, not '', for empty repo proxy attributes (#572460)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Ack.

On 03/16/2010 11:31 AM, Radek Vykydal wrote:
Concerns repo setting UI.  For proxy_username and proxy_pasword repo
attributes, using empty strings causes creating of invalid proxy specification
string in yum, e.g.  http://:@172.16.22.129:8080.

This means that setting proxy without user and password in repo UI
doesn't work.

---
  iw/task_gui.py |    9 +++++----
  1 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/iw/task_gui.py b/iw/task_gui.py
index 0a18da8..2fa916e 100644
--- a/iw/task_gui.py
+++ b/iw/task_gui.py
@@ -200,8 +200,8 @@ class RepoEditor:
                      self.proxyCheckbox.set_active(True)
                      self.proxyTable.set_sensitive(True)
                      self.proxyEntry.set_text(self.repo.proxy)
-                    self.usernameEntry.set_text(self.repo.proxy_username)
-                    self.passwordEntry.set_text(self.repo.proxy_password)
+                    self.usernameEntry.set_text(self.repo.proxy_username or '')
+                    self.passwordEntry.set_text(self.repo.proxy_password or '')
                  else:
                      self.proxyCheckbox.set_active(False)
                      self.proxyTable.set_sensitive(False)
@@ -250,8 +250,9 @@ class RepoEditor:
                  return False

              repo.proxy = proxy
-            repo.proxy_username = self.usernameEntry.get_text()
-            repo.proxy_password = self.passwordEntry.get_text()
+            # with empty string yum would create invalid proxy string
+            repo.proxy_username = self.usernameEntry.get_text() or None
+            repo.proxy_password = self.passwordEntry.get_text() or None

          repourl = self.baseurlEntry.get_text()
          repourl.strip()

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux