exc_info need to be in an except
block
This commit is contained in:
parent
e30ae803b0
commit
14b7a8ae11
1 changed files with 3 additions and 5 deletions
|
@ -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 = {}
|
||||||
|
|
Loading…
Reference in a new issue