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

Allow to use the local node even without --local

This commit is contained in:
Julien Duponchelle 2016-08-22 18:37:32 +02:00
parent cde28c849e
commit 46910a183e
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -242,9 +242,7 @@ class Controller:
return self._computes[compute_id] return self._computes[compute_id]
except KeyError: except KeyError:
server_config = Config.instance().get_section_config("Server") server_config = Config.instance().get_section_config("Server")
if compute_id == "local" and server_config.getboolean("local", False) is False: if compute_id == "vm":
raise aiohttp.web.HTTPNotFound(text="You try to use a node on the local server but the controller is not started with --local")
elif compute_id == "vm":
raise aiohttp.web.HTTPNotFound(text="You try to use a node on the GNS3 VM server but the GNS3 is not configured") raise aiohttp.web.HTTPNotFound(text="You try to use a node on the GNS3 VM server but the GNS3 is not configured")
raise aiohttp.web.HTTPNotFound(text="Compute ID {} doesn't exist".format(compute_id)) raise aiohttp.web.HTTPNotFound(text="Compute ID {} doesn't exist".format(compute_id))