Delete a project

This commit is contained in:
Julien Duponchelle committed 2015-01-23 11:48:20 +01:00
1 parent 9a0b260c56
commit 986a7f55ef
4 files changed
+54 -2

No files matched your search

+13
View File
@@ -98,10 +98,23 @@ class Project:
"location": self._location
}
def close(self):
"""Close the project, but keep informations on disk"""
pass
def commit(self):
"""Write project changes on disk"""
while self._vms_to_destroy:
vm = self._vms_to_destroy.pop()
directory = self.vm_working_directory(vm)
if os.path.exists(directory):
shutil.rmtree(directory)
def delete(self):
"""Remove project from disk"""
self.close()
if os.path.exists(self.path):
shutil.rmtree(self.path)