network: handle unparseable server-str
follow-up 9e57ae630b
fixes #6113
This commit is contained in:
@@ -150,6 +150,7 @@ class ElectrumWindow(App):
|
||||
net_params = self.network.get_parameters()
|
||||
try:
|
||||
server = ServerAddr.from_str_with_inference(server_str)
|
||||
if not server: raise Exception("failed to parse")
|
||||
except Exception as e:
|
||||
self.show_error(_("Invalid server details: {}").format(repr(e)))
|
||||
return
|
||||
|
||||
@@ -428,6 +428,7 @@ class NetworkChoiceLayout(object):
|
||||
net_params = self.network.get_parameters()
|
||||
try:
|
||||
server = ServerAddr.from_str_with_inference(str(self.server_e.text()))
|
||||
if not server: raise Exception("failed to parse")
|
||||
except Exception:
|
||||
return
|
||||
net_params = net_params._replace(server=server,
|
||||
|
||||
Reference in New Issue
Block a user