Skip to content

Commit 18b35ed

Browse files
committed
Actually, I need to catch AttributeError
1 parent 1b1f835 commit 18b35ed

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

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.12.0"
3+
version = "0.13.0"
44
description = "Filter public RSS feeds, remove articles that contain certain keywords or categories."
55
authors = [
66
{name = "Kevin Renskers", email = "kevin@loopwerk.io"},

rssfilter/models.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from django.db import models
77
from django.urls import reverse
88
from django.utils import timezone
9-
from httpx import ConnectError, ConnectTimeout
9+
from httpx import ConnectError, ConnectTimeout, ReadTimeout
1010

1111
from . import USER_AGENT
1212
from .settings import RSS_FILTER_CACHE_SECONDS
@@ -80,8 +80,8 @@ def get_feed_body(self) -> str:
8080
self.feed_body = r.text
8181
self.cache_date = timezone.now()
8282
self.save()
83-
except (ConnectTimeout, ConnectError, AttributeError):
84-
# Do nothing, just return the cached version
83+
except (ConnectTimeout, ConnectError, ReadTimeout):
84+
# Do nothing, just return the cached version (if available)
8585
pass
8686

8787
return self.feed_body

0 commit comments

Comments
 (0)