From 39106ac36bf7d1f7f07bf6d4177b03b6757e19ff Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Tue, 28 Feb 2017 13:11:03 +0100 Subject: [PATCH] Do not prevent the creation of a local server on a machine named gns3vm Fix #920 --- gns3server/controller/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gns3server/controller/__init__.py b/gns3server/controller/__init__.py index efc62bca..ee917327 100644 --- a/gns3server/controller/__init__.py +++ b/gns3server/controller/__init__.py @@ -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,