mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-02-17 06:00:42 +01:00
Switch from rssparser 3.3 to (the renamed) feedparser 4.1 in order to properly handle Bugzilla RSS feeds.
This commit is contained in:
parent
29778f5ada
commit
8111c48a49
1381
plugins/RSS/rssparser.py → plugins/RSS/feedparser.py
Normal file → Executable file
1381
plugins/RSS/rssparser.py → plugins/RSS/feedparser.py
Normal file → Executable file
File diff suppressed because it is too large
Load Diff
@ -33,7 +33,7 @@ import socket
|
|||||||
import sgmllib
|
import sgmllib
|
||||||
import threading
|
import threading
|
||||||
|
|
||||||
import rssparser
|
import feedparser
|
||||||
|
|
||||||
import supybot.conf as conf
|
import supybot.conf as conf
|
||||||
import supybot.utils as utils
|
import supybot.utils as utils
|
||||||
@ -227,11 +227,11 @@ class RSS(callbacks.Plugin):
|
|||||||
if self.willGetNewFeed(url):
|
if self.willGetNewFeed(url):
|
||||||
try:
|
try:
|
||||||
self.log.debug('Downloading new feed from %u', url)
|
self.log.debug('Downloading new feed from %u', url)
|
||||||
results = rssparser.parse(url)
|
results = feedparser.parse(url)
|
||||||
if 'bozo_exception' in results:
|
if 'bozo_exception' in results:
|
||||||
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 feedparser:')
|
||||||
raise callbacks.Error, 'Invalid (unparsable) RSS feed.'
|
raise callbacks.Error, 'Invalid (unparsable) RSS feed.'
|
||||||
except socket.timeout:
|
except socket.timeout:
|
||||||
return error('Timeout downloading feed.')
|
return error('Timeout downloading feed.')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user