If we can't resolve compute name return 0.0.0.0

It's not perfect, but it's rare in most cases it's
handle before.

Fix #892
pull/902/head
Julien Duponchelle 7 years ago
parent 9c7d2e9915
commit 08c2892295
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

@ -214,7 +214,10 @@ class Compute:
"""
Return the IP associated to the host
"""
return socket.gethostbyname(self._host)
try:
return socket.gethostbyname(self._host)
except socket.gaierror:
return '0.0.0.0'
@host.setter
def host(self, host):

Loading…
Cancel
Save