tinterface: hostname cannot be empty - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit adc91eb75efa21de4d4a59f262ce111017694689 DIR parent 916cdebacb635ee3605886b20a6128cba228f9c8 HTML Author: SomberNight <somber.night@protonmail.com> Date: Tue, 18 Sep 2018 20:21:10 +0200 interface: hostname cannot be empty Diffstat: M electrum/interface.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- DIR diff --git a/electrum/interface.py b/electrum/interface.py t@@ -115,10 +115,11 @@ class ErrorParsingSSLCert(Exception): pass class ErrorGettingSSLCertFromServer(Exception): pass - def deserialize_server(server_str: str) -> Tuple[str, str, str]: # host might be IPv6 address, hence do rsplit: host, port, protocol = str(server_str).rsplit(':', 2) + if not host: + raise ValueError('host must not be empty') if protocol not in ('s', 't'): raise ValueError('invalid network protocol: {}'.format(protocol)) int(port) # Throw if cannot be converted to int