1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 11:18:11 +00:00

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
This commit is contained in:
Julien Duponchelle 2017-02-06 16:47:40 +01:00
parent 9c7d2e9915
commit 08c2892295
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -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):