Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

download: provide description for an assertion error on attempts_allowed_or_not #1550

Merged
merged 1 commit into from
Dec 12, 2024
Merged
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
5 changes: 4 additions & 1 deletion dandi/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -783,7 +783,10 @@
yield {"status": "error", "message": str(exc)}
return
# for clear(er) typing, here we get only with int
assert isinstance(attempts_allowed_or_not, int)
assert isinstance(attempts_allowed_or_not, int), (

Check warning on line 786 in dandi/download.py

View check run for this annotation

Codecov / codecov/patch

dandi/download.py#L786

Added line #L786 was not covered by tests
f"attempts_allowed_or_not is {attempts_allowed_or_not!r} "
f"of type {type(attempts_allowed_or_not)}"
)
attempts_allowed = attempts_allowed_or_not
else:
lgr.warning("downloader logic: We should not be here!")
Expand Down
Loading