electrum

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

commit b97402b796497626812b9fdf1106ed2d61ac9171
parent e3c14fed8191834164702c9c19d0e2eda187f3b1
Author: ThomasV <thomasv@electrum.org>
Date:   Wed, 22 Nov 2017 12:41:50 +0100

Merge pull request #3343 from fr3aker/fix-ipv6addr-parsing

fix parsing of ipv6 addresses in interface
Diffstat:
Mlib/interface.py | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/interface.py b/lib/interface.py @@ -50,7 +50,7 @@ def Connection(server, queue, config_path): queue of the form (server, socket), where socket is None if connection failed. """ - host, port, protocol = server.split(':') + host, port, protocol = server.rsplit(':', 2) if not protocol in 'st': raise Exception('Unknown protocol: %s' % protocol) c = TcpConnection(server, queue, config_path) @@ -65,7 +65,7 @@ class TcpConnection(threading.Thread, util.PrintError): self.config_path = config_path self.queue = queue self.server = server - self.host, self.port, self.protocol = self.server.split(':') + self.host, self.port, self.protocol = self.server.rsplit(':', 2) self.host = str(self.host) self.port = int(self.port) self.use_ssl = (self.protocol == 's') @@ -247,7 +247,7 @@ class Interface(util.PrintError): def __init__(self, server, socket): self.server = server - self.host, _, _ = server.split(':') + self.host, _, _ = server.rsplit(':', 2) self.socket = socket self.pipe = util.SocketPipe(socket)