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

Fix crash if you manually delete the project directory and use the delete button in interface

Fix #697
This commit is contained in:
Julien Duponchelle 2016-09-30 10:47:37 +02:00
parent 36175f7c26
commit 4d6d0e96c6
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -564,7 +564,10 @@ class Project:
if self._status == "opened":
yield from self.close()
yield from self.delete_on_computes()
shutil.rmtree(self.path)
try:
shutil.rmtree(self.path)
except OSError as e:
raise aiohttp.web.HTTPConflict(text="Can not delete project directory {}: {}".format(self.path, str(e)))
@asyncio.coroutine
def delete_on_computes(self):