From 4c14b302f612b4da5acce69baf0a2071d1db1deb Mon Sep 17 00:00:00 2001 From: Alexander Kukushkin Date: Fri, 20 May 2022 10:24:25 +0200 Subject: [PATCH] Remove [] characters from IPv6 hosts when splitting to host and port (#2309) Close #2269 --- patroni/utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/patroni/utils.py b/patroni/utils.py index 1cfad919..01953d05 100644 --- a/patroni/utils.py +++ b/patroni/utils.py @@ -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])