mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-01-31 05:13:49 +02:00
parent
fdd1084714
commit
ab2af5ceab
@ -146,9 +146,12 @@ class Controller:
|
|||||||
"password": c.password,
|
"password": c.password,
|
||||||
"compute_id": c.id
|
"compute_id": c.id
|
||||||
})
|
})
|
||||||
os.makedirs(os.path.dirname(self._config_file), exist_ok=True)
|
try:
|
||||||
with open(self._config_file, 'w+') as f:
|
os.makedirs(os.path.dirname(self._config_file), exist_ok=True)
|
||||||
json.dump(data, f, indent=4)
|
with open(self._config_file, 'w+') as f:
|
||||||
|
json.dump(data, f, indent=4)
|
||||||
|
except OSError as e:
|
||||||
|
log.error("Can't write the configuration {}: {}".format(self._config_file, str(e)))
|
||||||
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def _load_controller_settings(self):
|
def _load_controller_settings(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user