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

from_source should fail when try to load empty file #319

Merged
merged 2 commits into from
Mar 1, 2024

Conversation

sandorkertesz
Copy link
Collaborator

@sandorkertesz sandorkertesz commented Feb 23, 2024

With this PR from_source throws an exception when the input is an empty file. Previously, the result was a TextReader.

The consequence of this change is that when reading/downloading multiple files now it is enough to have an empty file out of many valid ones and the program fail if the exception is uncaught.

Copy link
Member

@iainrussell iainrussell left a comment

Choose a reason for hiding this comment

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

This behaviour seems pretty reasonable to me. If someone encounters a real use case where they don't want this, we can reconsider.

@sandorkertesz sandorkertesz merged commit b955e69 into develop Mar 1, 2024
57 of 59 checks passed
@sandorkertesz sandorkertesz deleted the feature/empty-files branch March 1, 2024 17:54
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.

2 participants