Wrap subscriber IP in square brackets when IPv6

Change-Id: Ib7c84bbe1ae4faf3d8a260733dc801a46f28ebe1
Closes-Bug: #1754678
(cherry picked from commit 1b385a6d9318dcc04ef88370b2485b6b06a20f72)
This commit is contained in:
Derek Higgins 2018-03-09 14:53:21 +00:00 committed by Bogdan Dobrelya
parent 7d91d100a5
commit 479468449b

View File

@ -130,7 +130,7 @@ class Driver(base.DriverBase):
else:
host = socket.gethostname()
self.notification_factory.set_subscription_url(
'http://%s:%s/' % (host, port))
'http://%s:%s/' % (_escape_ipv6(host), port))
self._api.set_subscription_factory(self.notification_factory)
task = asyncio.Task(coro_notification)