diff options
| author | Michael Vogt <michael.vogt@ubuntu.com> | 2006-10-06 15:32:03 +0200 |
|---|---|---|
| committer | Michael Vogt <michael.vogt@ubuntu.com> | 2006-10-06 15:32:03 +0200 |
| commit | cab619af6ad5ce8f2ed9d599e54bfad8d57c3f60 (patch) | |
| tree | 8206b64c73552d09fc07ed1834aa45c4803d448e | |
| parent | 6b4f894acf07ee65b217dcdff5366d2bf4912d94 (diff) | |
| download | python-apt-cab619af6ad5ce8f2ed9d599e54bfad8d57c3f60.tar.gz | |
* UpdateManager/UpdateManager.py:
- fix proxy usage (fetch it from gconf)
| -rw-r--r-- | UpdateManager/UpdateManager.py | 19 | ||||
| -rw-r--r-- | debian/changelog | 6 |
2 files changed, 24 insertions, 1 deletions
diff --git a/UpdateManager/UpdateManager.py b/UpdateManager/UpdateManager.py index ab1d8a95..6fed3517 100644 --- a/UpdateManager/UpdateManager.py +++ b/UpdateManager/UpdateManager.py @@ -383,10 +383,27 @@ class UpdateManager(SimpleGladeApp): self.button_help.set_sensitive(False) self.gconfclient = gconf.client_get_default() + self.init_proxy() + # restore state self.restore_state() self.window_main.show() + def init_proxy(self): + if os.getenv("http_proxy"): + return + if self.gconfclient.get_bool("/system/http_proxy/use_http_proxy"): + host = self.gconfclient.get_string("/system/http_proxy/host") + port = self.gconfclient.get_int("/system/http_proxy/port") + use_auth = self.gconfclient.get_bool("/system/http_proxy/use_authentication") + if use_auth: + auth_user = self.gconfclient.get_string("/system/http_proxy/authentication_user") + auth_pw = self.gconfclient.get_string("/system/http_proxy/authentication_password") + proxy = "http://%s:%s@%s:%s/" % (auth_user,auth_pass,host, port) + else: + proxy = "http://%s:%s/" % (host, port) + os.putenv("http_proxy",proxy) + def header_column_func(self, cell_layout, renderer, model, iter): pkg = model.get_value(iter, LIST_PKG) if pkg == None: @@ -836,7 +853,7 @@ class UpdateManager(SimpleGladeApp): dialog.set_markup(msg) dialog.run() dialog.destroy() - + def on_button_dist_upgrade_clicked(self, button): #print "on_button_dist_upgrade_clicked" fetcher = DistUpgradeFetcher(self, self.new_dist) diff --git a/debian/changelog b/debian/changelog index afc3c0a0..4da39b63 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +update-manager (0.44.16) edgy; urgency=low + + * fix proxy use in user-mode + + -- Michael Vogt <michael.vogt@ubuntu.com> Fri, 6 Oct 2006 15:17:37 +0200 + update-manager (0.44.15) edgy; urgency=low * added missing python-vte dependency (lp: #63609) |
