-
- def destroy_workbench(self, workbench):
- """
- Destroy this workbench! Deletes the directory and all its contents!
-
- Makes sure the workbench actually belongs to this manager though.
- """
- # just in case
- workbench = os.path.abspath(workbench.dir)
-
- if not workbench.startswith(self.base_workbench_dir):
- raise WorkbenchOutsideScope(
- "Can't destroy workbench outside the base workbench dir")
-
- shutil.rmtree(workbench)