Skip to content

Commit d2f989e

Browse files
committed
Fix: Deal with missing version property when the feed can't be loaded at all
1 parent 09509e6 commit d2f989e

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

example/uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "django-rss-filter"
3-
version = "0.4.0"
3+
version = "0.5.0"
44
description = "Filter public RSS feeds, remove articles that contain certain keywords or categories."
55
authors = [
66
{name = "Kevin Renskers", email = "[email protected]"},

rssfilter/utils.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44

55
def validate_feed(feed_url: str) -> bool:
66
try:
7-
result = feedparser.parse(feed_url)
8-
if not result.version:
7+
feed = feedparser.parse(feed_url)
8+
version = feed.get("version", "")
9+
if not version:
910
return False
1011
return True
1112
except ValueError:

uv.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)