enhance reddit module

This commit is contained in:
Dima Gerasimov 2020-01-17 18:40:11 +00:00
parent 3dabd7ff46
commit 7d56d85731
2 changed files with 35 additions and 21 deletions

View file

@ -88,6 +88,7 @@ def get_files(pp: PathIsh, glob: str, sort=True) -> List[Path]:
"""
Helper function to avoid boilerplate.
"""
# TODO FIXME mm, some wrapper to assert iterator isn't empty?
path = Path(pp)
if path.is_dir():
gp: Iterable[Path] = path.glob(glob)