From 65bd1386cc7400117fe4d4e61d590a61b93b2a16 Mon Sep 17 00:00:00 2001 From: aikaterna <20862007+aikaterna@users.noreply.github.com> Date: Tue, 6 Oct 2020 16:29:58 -0700 Subject: [PATCH] [RSS] Account for aiohttp fetch failure --- rss/rss.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/rss/rss.py b/rss/rss.py index 1e65362..303c4e2 100644 --- a/rss/rss.py +++ b/rss/rss.py @@ -25,7 +25,7 @@ from .tag_type import INTERNAL_TAGS, VALID_IMAGES, TagType log = logging.getLogger("red.aikaterna.rss") -__version__ = "1.1.18" +__version__ = "1.1.19" class RSS(commands.Cog): @@ -314,6 +314,9 @@ class RSS(commands.Cog): async def _fetch_feedparser_object(self, url: str): """Get all feedparser entries from a url.""" html = await self._get_url_content(url) + if not html: + return None + feedparser_obj = feedparser.parse(html) if feedparser_obj.bozo: