mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-06 09:34:05 +01:00
Removed some debugging code, and added a bit of extra debug logging.
This commit is contained in:
parent
3f1b0335c2
commit
e94900c0eb
@ -199,10 +199,6 @@ class RSS(callbacks.Privmsg):
|
|||||||
self.log.debug('Downloading new feed from %u', url)
|
self.log.debug('Downloading new feed from %u', url)
|
||||||
results = rssparser.parse(url)
|
results = rssparser.parse(url)
|
||||||
if 'bozo_exception' in results:
|
if 'bozo_exception' in results:
|
||||||
## for (k, v) in results.items():
|
|
||||||
## s = '%r: %r' % (k, v)
|
|
||||||
## if len(s) <= 80:
|
|
||||||
## print s
|
|
||||||
raise results['bozo_exception']
|
raise results['bozo_exception']
|
||||||
except sgmllib.SGMLParseError:
|
except sgmllib.SGMLParseError:
|
||||||
self.log.exception('Uncaught exception from rssparser:')
|
self.log.exception('Uncaught exception from rssparser:')
|
||||||
@ -213,8 +209,11 @@ class RSS(callbacks.Privmsg):
|
|||||||
# These seem mostly harmless. We'll need reports of a
|
# These seem mostly harmless. We'll need reports of a
|
||||||
# kind that isn't.
|
# kind that isn't.
|
||||||
self.log.debug('Allowing bozo_exception %r through.', e)
|
self.log.debug('Allowing bozo_exception %r through.', e)
|
||||||
self.cachedFeeds[url] = results
|
if results.get('feed', {}):
|
||||||
self.lastRequest[url] = time.time()
|
self.cachedFeeds[url] = results
|
||||||
|
self.lastRequest[url] = time.time()
|
||||||
|
else:
|
||||||
|
self.log.debug('Not caching results; feed is empty.')
|
||||||
try:
|
try:
|
||||||
return self.cachedFeeds[url]
|
return self.cachedFeeds[url]
|
||||||
except KeyError:
|
except KeyError:
|
||||||
|
Loading…
Reference in New Issue
Block a user