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

Allow to delete a non opened project

This commit is contained in:
Julien Duponchelle 2016-08-16 13:30:10 +02:00
parent 0613efa297
commit 017202d151
No known key found for this signature in database
GPG Key ID: CE8B29639E07F5E8

View File

@ -514,10 +514,10 @@ class Project:
except OSError as e:
log.warning(str(e))
@open_required
@asyncio.coroutine
def delete(self):
yield from self.close()
if self._status == "opened":
yield from self.close()
yield from self.delete_on_computes()
shutil.rmtree(self.path, ignore_errors=True)