Support for profil settings

This commit is contained in:
Julien Duponchelle committed 2016-08-22 17:21:03 +02:00
1 parent cde28c849e
commit 5bb1abb2a9
3 files changed
+38 -12

No files matched your search

+5 -1
View File
@@ -48,9 +48,13 @@ class Controller:
config_path = os.path.join(os.path.expandvars("%APPDATA%"), "GNS3")
else:
config_path = os.path.join(os.path.expanduser("~"), ".config", "GNS3")
self._config_file = os.path.join(config_path, "gns3_controller.conf")
server_config = Config.instance().get_section_config("Server")
if Config.instance().profil:
config_path = os.path.join(config_path, "profiles", Config.instance().profil)
self._config_file = os.path.join(config_path, "gns3_controller.conf")
log.info("Load controller configuration file {}".format(self._config_file))
if server_config.getboolean("local", False) is True:
self._computes["local"] = Compute(compute_id="local",
controller=self,