This commit is contained in:
Jeremy Fincher 2004-04-05 09:50:58 +00:00
parent f8f1b4585f
commit 36f182dc60
1 changed files with 5 additions and 1 deletions

View File

@ -174,7 +174,11 @@ class RSS(callbacks.Privmsg):
self.lastRequest[url] = time.time()
finally:
self.currentlyDownloading.discard(url)
return self.cachedFeeds[url]
try:
return self.cachedFeeds[url]
except KeyError:
self.lastRequest[url] = 0
return {'items': {'title': 'Unable to download feed.'}}
def getHeadlines(self, feed):
return [utils.htmlToText(d['title'].strip()) for d in feed['items']]