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:
parent
9c7d2e9915
commit
08c2892295
@ -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…
Reference in New Issue
Block a user