exc_info need to be in an except block

This commit is contained in:
jesopo 2019-06-27 16:00:14 +01:00
parent e30ae803b0
commit 14b7a8ae11

View file

@ -38,13 +38,11 @@ class Module(ModuleManager.BaseModule):
try: try:
data = utils.http.request(url) data = utils.http.request(url)
feed = feedparser.parse(data.data) feed = feedparser.parse(data.data)
feed["feed"] or ValueError("Feed info empty")
except: except:
feed = None self.log.warn("Failed to GET RSS for %s", [url],
if not feed or not feed["feed"]:
self.log.warn("Failed to parse rss for %s", [url],
exc_info=True) exc_info=True)
continue return
feed_title = feed["feed"]["title"] feed_title = feed["feed"]["title"]
entry_formatted = {} entry_formatted = {}