diff --git a/melamine/classes.py b/melamine/classes.py index 3e407a5..921ca97 100644 --- a/melamine/classes.py +++ b/melamine/classes.py @@ -30,7 +30,17 @@ async def get_all_hardlinks(paths: Set[Path]) -> None: return paths -class ShredDir: +class AsyncObject(object): + async def __new__(cls, *a, **kw): + instance = super().__new__(cls) + await instance.__init__(*a, **kw) + return instance + + async def __init__(self): + pass + + +class ShredDir(AsyncObject): """Class for tracking each directory to be shredded, and its contents.""" async def __init__(self, path: Path) -> None: @@ -70,7 +80,7 @@ class ShredDir: return hash(self.absolute_path) -class ShredFile: +class ShredFile(AsyncObject): """Class for tracking each file to be shredded.""" async def __init__(self, path: Path) -> None: