handle key error when news feed does not load

workspace
Brendan Howell 4 years ago
parent d9a71d853e
commit d107a45797

@ -298,9 +298,14 @@ class Publications(Bureau):
thread.join()
for source in feeds:
try:
feed = feedparser.parse(feed_data[source["url"]])
except KeyError:
self.log.debug("Skipping missing feed data (network problem?):%s", source["url"])
continue
if feed is None:
continue
num_entries = source["count"]
# work around if we don't have enough news

Loading…
Cancel
Save