mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 04:39:26 +01:00
Support [ipv6]:port
format
This commit is contained in:
parent
c87aacb690
commit
61d9596d35
@ -256,6 +256,11 @@ class Servers(registry.SpaceSeparatedListOfStrings):
|
||||
def convert(self, s):
|
||||
s = self.normalize(s)
|
||||
(server, port) = s.rsplit(':', 1)
|
||||
|
||||
# support for `[ipv6]:port` format
|
||||
if server.startwith("[") and server.endswith("]"):
|
||||
server = server[1:-1]
|
||||
|
||||
port = int(port)
|
||||
return (server, port)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user