tfix set_server. keep compatibility with the gtk interface - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit e7e9e8916b60e04c7eda9afffa255c466ca5c9f1 DIR parent 385b515439c6e36863a3e3941e2b84363fccc8c5 HTML Author: thomasv <thomasv@gitorious> Date: Tue, 2 Oct 2012 12:52:47 +0200 fix set_server. keep compatibility with the gtk interface Diffstat: M lib/gui_qt.py | 6 +++++- M lib/wallet.py | 2 +- 2 files changed, 6 insertions(+), 2 deletions(-) --- DIR diff --git a/lib/gui_qt.py b/lib/gui_qt.py t@@ -1450,7 +1450,11 @@ class ElectrumWindow(QMainWindow): try: cfg.set_key("proxy", { u'mode':unicode(proxy_mode.currentText()).lower(), u'host':unicode(proxy_host.text()), u'port':unicode(proxy_port.text()) }, True) - wallet.set_server(server, cfg.config["proxy"]) + if cfg.config["proxy"]["mode"] != "none": + wallet.set_server(server, cfg.config["proxy"]) + else: + wallet.set_server(server) + except Exception as err: QMessageBox.information(None, _('Error'), str(err), _('OK')) if parent == None: DIR diff --git a/lib/wallet.py b/lib/wallet.py t@@ -347,7 +347,7 @@ class Wallet: def is_up_to_date(self): return self.interface.responses.empty() and not self.interface.unanswered_requests - def set_server(self, server, proxy): + def set_server(self, server, proxy=None): # raise an error if the format isnt correct a,b,c = server.split(':') b = int(b)