Fix IPV6 server support

Fix #717
This commit is contained in:
Julien Duponchelle committed 2016-10-17 14:10:25 +02:00
1 parent 421e127603
commit b9b0feed62
2 files changed
+12 -4

No files matched your search

+5 -1
View File
@@ -409,7 +409,11 @@ class Compute:
self._controller.notification.emit("compute.updated", self.__json__())
def _getUrl(self, path):
return "{}://{}:{}/v2/compute{}".format(self._protocol, self._host, self._port, path)
host = self._host
# IPV6
if host and ":" in host:
host = "[{}]".format(host)
return "{}://{}:{}/v2/compute{}".format(self._protocol, host, self._port, path)
@asyncio.coroutine
def _run_http_query(self, method, path, data=None, timeout=10, raw=False):