mirror of
https://github.com/GNS3/gns3-server
synced 2024-12-01 04:38:12 +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:
parent
36175f7c26
commit
4d6d0e96c6
@ -564,7 +564,10 @@ class Project:
|
|||||||
if self._status == "opened":
|
if self._status == "opened":
|
||||||
yield from self.close()
|
yield from self.close()
|
||||||
yield from self.delete_on_computes()
|
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
|
@asyncio.coroutine
|
||||||
def delete_on_computes(self):
|
def delete_on_computes(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user