mirror of
https://github.com/DarrylNixon/melamine.git
synced 2024-04-22 06:27:20 -07:00
Stray await
This commit is contained in:
parent
04bce50fb9
commit
efce306977
1 changed files with 3 additions and 4 deletions
|
@ -3,7 +3,6 @@ import hashlib
|
|||
from collections.abc import Generator
|
||||
from pathlib import Path
|
||||
from secrets import token_bytes
|
||||
from typing import List
|
||||
from typing import Set
|
||||
from typing import Union
|
||||
|
||||
|
@ -40,7 +39,7 @@ class ShredDir(AsyncObject):
|
|||
stat = await path.stat()
|
||||
self.inode = stat.st_ino
|
||||
|
||||
async def _get_contents(self, recursive: bool) -> List:
|
||||
async def _get_contents(self, recursive: bool) -> Set:
|
||||
tasks = []
|
||||
async for subpath in self.absolute_path.glob("*"):
|
||||
if await subpath.is_dir():
|
||||
|
@ -52,8 +51,8 @@ class ShredDir(AsyncObject):
|
|||
else:
|
||||
logger.warning(f"Subdirectory found: {subpath}, skipping (see -r/--recursive))")
|
||||
elif subpath.is_file():
|
||||
tasks.append(await ShredFile(subpath))
|
||||
return await asyncio.gather(*tasks)
|
||||
tasks.append(ShredFile(subpath))
|
||||
return set(await asyncio.gather(*tasks))
|
||||
|
||||
def enumerate_mount_points(self) -> Generator:
|
||||
for item in self.contents:
|
||||
|
|
Loading…
Reference in a new issue