Skip to content

Commit 636cd10

Browse files
Merge pull request #866 from cderici/ipv6-fix-on-masterr
[JUJU-3885] forward port ipv6 support
2 parents c8cd13a + 0d43f17 commit 636cd10

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

juju/client/connection.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -694,7 +694,9 @@ def https_connection(self):
694694
695695
"""
696696
endpoint = self.endpoint
697-
host, remainder = endpoint.split(':', 1)
697+
# Support IPv6 by right splitting on : and removing [] around IP address for host
698+
host, remainder = endpoint.rsplit(':', 1)
699+
host = host.strip("[]")
698700
port = remainder
699701
if '/' in remainder:
700702
port, _ = remainder.split('/', 1)

0 commit comments

Comments
 (0)