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

File open context manager fixes #40

Merged
merged 4 commits into from
Sep 12, 2024
Merged

File open context manager fixes #40

merged 4 commits into from
Sep 12, 2024

Conversation

ptgolden
Copy link
Member

A few changes that organize with open... context managers. It looks like there are a ton of changes, but only because a large block of code was de-indented in download_from_yaml in 1a04064.

Fixes monarch-initiative/monarch-ingest#600

This prevents creating an empty file when a request is unsuccessful.
The file is read immediately, so there's no need for the rest of the
function to be included in the `with` statement.
@kevinschaper kevinschaper self-requested a review September 12, 2024 15:50
@ptgolden ptgolden merged commit 50d8506 into main Sep 12, 2024
8 checks passed
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.

Delete incomplete cached file during ingest download?
2 participants