From 17e4b51d18583a4ed8124c4cc1214ea26a48b68d Mon Sep 17 00:00:00 2001 From: Michael Date: Mon, 8 Sep 2014 20:45:36 -0600 Subject: [PATCH] Testing out dummy config --- gns3server/server.py | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/gns3server/server.py b/gns3server/server.py index 49223790..85365e56 100644 --- a/gns3server/server.py +++ b/gns3server/server.py @@ -140,6 +140,17 @@ class Server(object): JSONRPCWebSocket.register_destination(destination, instance.name) instance.start() # starts the new process + def _dummy_cloud_config(self): + + config = configparser.ConfigParser() + config["CLOUD_SERVER"] = { + "WEB_AUTH_ENABLED" : "no", + "WEB_USERNAME" : "", + "WEB_PASSWORD" : "", + "SSL_ENABLED" : "no", + } + + return config["CLOUD_SERVER"] def run(self): """ @@ -147,7 +158,10 @@ class Server(object): """ # FIXME: debug mode! - cloud_config = Config.instance().get_section_config("CLOUD_SERVER") + try: + cloud_config = Config.instance().get_section_config("CLOUD_SERVER") + except KeyError: + cloud_config = self._dummy_cloud_config() settings = { "debug":True,