[RSS] Account for None on post time

This commit is contained in:
aikaterna
2020-12-04 15:17:58 -08:00
committed by GitHub
parent 0134a704fd
commit fd32a9b370

View File

@@ -25,7 +25,7 @@ from .tag_type import INTERNAL_TAGS, VALID_IMAGES, TagType
log = logging.getLogger("red.aikaterna.rss")
__version__ = "1.3.1"
__version__ = "1.3.2"
class RSS(commands.Cog):
@@ -978,9 +978,10 @@ class RSS(commands.Cog):
if not force:
entry_time = await self._time_tag_validation(sorted_feed_by_post_time[0])
if last_time > entry_time:
log.debug("Not posting because new entry is older than last saved entry.")
return
if (last_time and entry_time) is not None:
if last_time > entry_time:
log.debug("Not posting because new entry is older than last saved entry.")
return
await self._update_last_scraped(channel, name, sorted_feed_by_post_time[0].title, sorted_feed_by_post_time[0].link, entry_time)
feedparser_plus_objects = []