Do not prevent the creation of a local server on a machine named gns3vm

Fix #920
This commit is contained in:
Julien Duponchelle 2017-02-28 13:11:03 +01:00
parent 41d7570b24
commit 39106ac36b
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -62,8 +62,13 @@ class Controller:
console_host = host
if host == "0.0.0.0":
host = "127.0.0.1"
name = socket.gethostname()
if name == "gns3vm":
name = "Main server"
yield from self.add_compute(compute_id="local",
name=socket.gethostname(),
name=name,
protocol=server_config.get("protocol", "http"),
host=host,
console_host=console_host,