Browse Source

fix set_server. keep compatibility with the gtk interface

283
thomasv 12 years ago
parent
commit
e7e9e8916b
  1. 4
      lib/gui_qt.py
  2. 2
      lib/wallet.py

4
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)
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:

2
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)

Loading…
Cancel
Save