From f81d1d4a64a1597a5fd6ffb8278eb83aa9d66161 Mon Sep 17 00:00:00 2001 From: Darryl Nixon Date: Sun, 16 Jul 2023 14:47:22 -0700 Subject: [PATCH] manually process asynchonously --- melamine/shred.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/melamine/shred.py b/melamine/shred.py index 0fd4a59..af5237e 100644 --- a/melamine/shred.py +++ b/melamine/shred.py @@ -76,7 +76,7 @@ async def main(job: argparse.Namespace) -> bool: # scandir/glob/rglob doesn't play nice with FileNotFound errors, # so let's avoid them entirely for now in /proc, /dev, and /sys check_paths = [mount_point / path for path in ("/proc", "/dev", "/sys")] - manual_process = any(await path.exists() for path in check_paths) + manual_process = any(asyncio.gather(*[path.exists() for path in check_paths])) if manual_process: # Traverse every directory in mount_point recursively except /proc, /dev, and /sys async for item in mount_point.glob("*"):