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:
parent
36175f7c26
commit
4d6d0e96c6
@ -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):
|
||||
|
Loading…
Reference in New Issue
Block a user