mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-24 15:58:08 +00:00
Fix issue with controller config saved before checking current version with previous one
This commit is contained in:
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…
Reference in New Issue
Block a user