general: use less explicit kompress boilerplate in modules
now get_files/kompress library can handle it transparently
This commit is contained in:
parent
cd89a2e1c7
commit
7ed34531d7
9 changed files with 14 additions and 19 deletions
|
@ -23,8 +23,6 @@ config = make_config(google)
|
|||
from pathlib import Path
|
||||
from typing import Optional, Iterable
|
||||
|
||||
from ...core.kompress import kexists
|
||||
|
||||
|
||||
def get_takeouts(*, path: Optional[str]=None) -> Iterable[Path]:
|
||||
"""
|
||||
|
@ -33,7 +31,7 @@ def get_takeouts(*, path: Optional[str]=None) -> Iterable[Path]:
|
|||
# TODO FIXME zip is not great..
|
||||
# allow a lambda expression? that way the user could restrict it
|
||||
for takeout in get_files(config.takeout_path, glob='*.zip'):
|
||||
if path is None or kexists(takeout, path):
|
||||
if path is None or (takeout / path).exists():
|
||||
yield takeout
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue