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: except ImportError:
raise ImportError('Please install python-feedparser') raise ImportError('Please install python-feedparser')
if feedparser.__version__ >= '5.0': if '5.1' > feedparser.__version__ >= '5.0':
# feedparser >= 5.0 replaces this regexp on sgmllib and mechanize < 2.0 # feedparser 5.0.x replaces this regexp on sgmllib
# fails with malformated webpages. # and mechanize < 0.2 fails with malformed pages.
import sgmllib import sgmllib
import re import re
sgmllib.endbracket = re.compile('[<>]') sgmllib.endbracket = re.compile('[<>]')