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

Fix resource leaks #3339

Merged
merged 1 commit into from
Mar 31, 2024
Merged

Conversation

Minnozz
Copy link
Contributor

@Minnozz Minnozz commented Mar 29, 2024

Rewrite places where files (or other resources) are opened but not closed to "with" blocks, which automatically call close() at the end of the scope.

Also simplify some tests where images need to be saved to a model field: an opened file can be passed directly to FileField.save().

Rewrite places where files (or other resources) are opened but not closed to "with" blocks, which
automatically call close() at the end of the scope.

Also simplify some tests where images need to be saved to a model field: an opened file can be
passed directly to FileField.save().
@mouse-reeve mouse-reeve merged commit f28800a into bookwyrm-social:main Mar 31, 2024
10 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.

None yet

2 participants