core: add warning when get_files returns no files, my.twitter.archive: make more defensive in case of no archives
This commit is contained in:
parent
b7662378a2
commit
b99b2f3cfa
3 changed files with 29 additions and 12 deletions
|
@ -151,6 +151,12 @@ def get_files(pp: Paths, glob: str=DEFAULT_GLOB, sort: bool=True) -> Tuple[Path,
|
|||
|
||||
if sort:
|
||||
paths = list(sorted(paths))
|
||||
|
||||
if len(paths) == 0:
|
||||
# todo make it conditionally defensive based on some global settings
|
||||
# todo stacktrace?
|
||||
warnings.warn(f'No paths were matched against {paths}. This might result in missing data.')
|
||||
|
||||
return tuple(paths)
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue