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

feedparser does not return an error on empty files #461

Open
dechamps opened this issue Jul 23, 2024 · 0 comments
Open

feedparser does not return an error on empty files #461

dechamps opened this issue Jul 23, 2024 · 0 comments

Comments

@dechamps
Copy link

$ python3 -c 'import feedparser; import pprint; pprint.pp(feedparser.parse("/dev/null"));'
{'bozo': False, 'entries': [], 'feed': {}, 'headers': {}}

This makes it look like /dev/null is a valid feed with no entries, which is clearly not the case - an empty file is not a valid feed. An error should be reported instead (ideally an exception, see #329).

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

No branches or pull requests

1 participant