Skip to content

2362 skip MMAR downloading if the remote has http 500#2363

Merged
wyli merged 2 commits intoProject-MONAI:devfrom
wyli:2362-mmar-download-error
Jun 14, 2021
Merged

2362 skip MMAR downloading if the remote has http 500#2363
wyli merged 2 commits intoProject-MONAI:devfrom
wyli:2362-mmar-download-error

Conversation

@wyli
Copy link
Copy Markdown
Contributor

@wyli wyli commented Jun 12, 2021

Signed-off-by: Wenqi Li [email protected]

Fixes #2362

Description

skip downloading if there's a remote server error

Status

Ready

Types of changes

  • Non-breaking change (fix or new feature that would not break existing functionality).
  • Quick tests passed locally by running ./runtests.sh --quick --unittests.
  • In-line docstrings updated.

@wyli wyli requested review from Nic-Ma, ericspod and madil90 June 12, 2021 15:07
Copy link
Copy Markdown
Contributor

@Nic-Ma Nic-Ma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for your quick fix, I put some minor comments inline.
Others look good to me.

Thanks.

download_mmar(idx, mmar_dir=tmp_dir, progress=False) # repeated to check caching
self.assertTrue(os.path.exists(os.path.join(tmp_dir, idx)))
except (ContentTooShortError, HTTPError, RuntimeError) as e:
print(str(e))
Copy link
Copy Markdown
Contributor

@Nic-Ma Nic-Ma Jun 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wyli added 2 commits June 14, 2021 17:02
@wyli wyli force-pushed the 2362-mmar-download-error branch from 9dcff43 to 09d2bd7 Compare June 14, 2021 16:06
@wyli wyli enabled auto-merge (squash) June 14, 2021 16:06
@wyli wyli merged commit fe3521f into Project-MONAI:dev Jun 14, 2021
@wyli wyli deleted the 2362-mmar-download-error branch June 30, 2021 22:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

nightly tests: mmar downloading

2 participants