From 267a5ae3a8cb6e56884ae23f5fb7eecad6d62bbf Mon Sep 17 00:00:00 2001 From: Julien Duponchelle Date: Fri, 27 Jan 2017 10:52:17 +0100 Subject: [PATCH] Do not crash when you broke permission on your file system during execution Fix #878 --- gns3server/controller/project.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gns3server/controller/project.py b/gns3server/controller/project.py index 24614236..4debcb73 100644 --- a/gns3server/controller/project.py +++ b/gns3server/controller/project.py @@ -643,8 +643,11 @@ class Project: # We don't care if a compute is down at this step except (ComputeError, aiohttp.web.HTTPNotFound, aiohttp.web.HTTPConflict): pass - if os.path.exists(path + ".backup"): - shutil.copy(path + ".backup", path) + try: + if os.path.exists(path + ".backup"): + shutil.copy(path + ".backup", path) + except (PermissionError, OSError): + pass self._status = "closed" self._loading = False raise e