AttributeError bei ungültigem Feed gefixt

This commit is contained in:
Andreas Bielawski 2017-10-04 12:47:35 +02:00
parent 4bf64b3f0f
commit 4cb19a7ba5

2
bot.py
View File

@ -246,7 +246,7 @@ def check_feed(bot, key):
logger.info(feed_url)
data = feedparser.parse(feed_url)
if 'link' not in data.feed:
logger.warning('Kein gültiger Feed, Status-Code ' + str(data.status))
logger.warning('Kein gültiger Feed, Status-Code ' + str(data["status"]))
return None
if 'title' not in data.feed:
feed_title = data.feed['link']