newsfeed: No need for workaround with feedparser>=5.1

This commit is contained in:
Laurent Bachelier 2014-10-08 15:03:34 +02:00
commit 362b441445

View file

@ -24,9 +24,9 @@ try:
except ImportError:
raise ImportError('Please install python-feedparser')
if feedparser.__version__ >= '5.0':
# feedparser >= 5.0 replaces this regexp on sgmllib and mechanize < 2.0
# fails with malformated webpages.
if '5.1' > feedparser.__version__ >= '5.0':
# feedparser 5.0.x replaces this regexp on sgmllib
# and mechanize < 0.2 fails with malformed pages.
import sgmllib
import re
sgmllib.endbracket = re.compile('[<>]')