Fix issue with controller config saved before checking current version with previous one

pull/2272/head
grossmj 9 months ago
parent a69feb3682
commit 709aa46074

@ -191,9 +191,8 @@ class Controller:
Save the controller configuration on disk
"""
if self._config_loaded is False:
return
controller_settings = dict()
if self._config_loaded:
controller_settings = {"computes": [],
"templates": [],
"gns3vm": self.gns3vm.__json__(),
@ -229,8 +228,7 @@ class Controller:
try:
if not os.path.exists(self._config_file):
self._config_loaded = True
self.save()
self.save() # this will create the config file
with open(self._config_file) as f:
controller_settings = json.load(f)
except (OSError, ValueError) as e:

Loading…
Cancel
Save