1
0
mirror of https://github.com/GNS3/gns3-server synced 2025-01-12 09:00:57 +00:00

Merge branch '2.0' into 2.1

This commit is contained in:
Julien Duponchelle 2017-02-28 14:32:40 +01:00
commit 583327ad33
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -114,7 +114,10 @@ class ServerHandler:
def write_settings(request, response): def write_settings(request, response):
controller = Controller.instance() controller = Controller.instance()
controller.settings = request.json controller.settings = request.json
try:
controller.save() controller.save()
except (OSError, PermissionError) as e:
raise HTTPConflict(text="Can't save the settings {}".format(str(e)))
response.json(controller.settings) response.json(controller.settings)
response.set_status(201) response.set_status(201)