electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit e7e9e8916b60e04c7eda9afffa255c466ca5c9f1
parent 385b515439c6e36863a3e3941e2b84363fccc8c5
Author: thomasv <thomasv@gitorious>
Date:   Tue,  2 Oct 2012 12:52:47 +0200

fix set_server. keep compatibility with the gtk interface

Diffstat:
Mlib/gui_qt.py | 6+++++-
Mlib/wallet.py | 2+-
2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/lib/gui_qt.py b/lib/gui_qt.py @@ -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: diff --git a/lib/wallet.py b/lib/wallet.py @@ -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)