mirror of
https://github.com/GNS3/gns3-server.git
synced 2026-10-24 20:02:35 +03:00
parent
1d1861fe51
commit
bd1560ae50
@ -121,16 +121,16 @@ class Controller:
|
|||||||
"""
|
"""
|
||||||
Reload the controller configuration from disk
|
Reload the controller configuration from disk
|
||||||
"""
|
"""
|
||||||
|
|
||||||
if not os.path.exists(self._config_file):
|
|
||||||
yield from self._import_gns3_gui_conf()
|
|
||||||
self.save()
|
|
||||||
try:
|
try:
|
||||||
|
if not os.path.exists(self._config_file):
|
||||||
|
yield from self._import_gns3_gui_conf()
|
||||||
|
self.save()
|
||||||
with open(self._config_file) as f:
|
with open(self._config_file) as f:
|
||||||
data = json.load(f)
|
data = json.load(f)
|
||||||
except OSError as e:
|
except (OSError, json.JSONDecodeError) as e:
|
||||||
log.critical("Cannot load %s: %s", self._config_file, str(e))
|
log.critical("Cannot load %s: %s", self._config_file, str(e))
|
||||||
return
|
return
|
||||||
|
|
||||||
if "settings" in data:
|
if "settings" in data:
|
||||||
self._settings = data["settings"]
|
self._settings = data["settings"]
|
||||||
if "gns3vm" in data:
|
if "gns3vm" in data:
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user