mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
Remove [] characters from IPv6 hosts when splitting to host and port (#2309)
Close #2269
This commit is contained in:
+1
-1
@@ -362,7 +362,7 @@ def polling_loop(timeout, interval=1):
|
||||
def split_host_port(value, default_port):
|
||||
t = value.rsplit(':', 1)
|
||||
if ':' in t[0]:
|
||||
t[0] = t[0].strip('[]')
|
||||
t[0] = ','.join([h.strip().strip('[]') for h in t[0].split(',')])
|
||||
t.append(default_port)
|
||||
return t[0], int(t[1])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user