1
0
mirror of https://github.com/GNS3/gns3-server synced 2024-11-28 11:18:11 +00:00

Do not crash when you broke permission on your file system during

execution

Fix #878
This commit is contained in:
Julien Duponchelle 2017-01-27 10:52:17 +01:00
parent 8ff7670031
commit 267a5ae3a8
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -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