Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 11 additions & 1 deletion dtcli/pull.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
exists=True, file_okay=True, dir_okay=False, writable=True, resolve_path=True
),
default=None,
help="Specific files to pull",
help="Path to file of specific files to pull.",
)
@click.option(
"--cores",
Expand Down Expand Up @@ -96,6 +96,7 @@ def pull( # noqa: C901
logger.exception(
"Configuration Missing!! Run `datatrail config init`.",
)
ctx.exit(1)
raise click.Abort()

try:
Expand Down Expand Up @@ -193,4 +194,13 @@ def pull( # noqa: C901
cores=cores,
verbose=verbose,
)
# Check that all files have been downloaded.
for f in files["missing"]:
local_path = path.join(directory, f.replace("cadc:CHIMEFRB", ""))
if not path.exists(local_path):
error_console.print(
f"File not downloaded: {local_path}",
style="bold red",
)
ctx.exit(1)
return None
Loading