From 1cf987a548430ba54d39ad7243a7c0dee1f246fa Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Tue, 13 Dec 2016 09:25:44 +0100 Subject: [PATCH] Fix a rare crash when writing a file on a remote server Fix #829 --- gns3server/handlers/api/controller/project_handler.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gns3server/handlers/api/controller/project_handler.py b/gns3server/handlers/api/controller/project_handler.py index f9f12ba7..03930494 100644 --- a/gns3server/handlers/api/controller/project_handler.py +++ b/gns3server/handlers/api/controller/project_handler.py @@ -456,8 +456,9 @@ class ProjectHandler: if not packet: break f.write(packet) - except FileNotFoundError: raise aiohttp.web.HTTPNotFound() except PermissionError: raise aiohttp.web.HTTPForbidden() + except OSError as e: + raise aiohttp.web.HTTPConflict(text=str(e))