Implement deletion
This commit is contained in:
parent
1b69d6aab4
commit
5d6a1e1f7d
@ -5,6 +5,7 @@
|
|||||||
"""
|
"""
|
||||||
import json
|
import json
|
||||||
import logging
|
import logging
|
||||||
|
import shutil
|
||||||
from os import PathLike
|
from os import PathLike
|
||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
|
|
||||||
@ -89,7 +90,6 @@ class Hierarchy(PathLike):
|
|||||||
|
|
||||||
def cleanup(self, **kwargs):
|
def cleanup(self, **kwargs):
|
||||||
"""Clean up this Hierarchy's data from the filesystem."""
|
"""Clean up this Hierarchy's data from the filesystem."""
|
||||||
import shutil
|
|
||||||
|
|
||||||
syslog.info(f"Performing cleanup on {self._path}")
|
syslog.info(f"Performing cleanup on {self._path}")
|
||||||
|
|
||||||
@ -101,6 +101,8 @@ class Hierarchy(PathLike):
|
|||||||
)
|
)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
shutil.rmtree(self)
|
||||||
|
|
||||||
def read_metadata(self):
|
def read_metadata(self):
|
||||||
"""Read this repository's metadata from its file and
|
"""Read this repository's metadata from its file and
|
||||||
then return it.
|
then return it.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user