mirror of
https://github.com/GNS3/gns3-server
synced 2024-11-24 17:28:08 +00:00
Allow to delete a non opened project
This commit is contained in:
parent
0613efa297
commit
017202d151
@ -514,9 +514,9 @@ class Project:
|
|||||||
except OSError as e:
|
except OSError as e:
|
||||||
log.warning(str(e))
|
log.warning(str(e))
|
||||||
|
|
||||||
@open_required
|
|
||||||
@asyncio.coroutine
|
@asyncio.coroutine
|
||||||
def delete(self):
|
def delete(self):
|
||||||
|
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, ignore_errors=True)
|
shutil.rmtree(self.path, ignore_errors=True)
|
||||||
|
Loading…
Reference in New Issue
Block a user