1
0
mirror of https://github.com/sjlongland/tornado-news.git synced 2025-09-14 02:23:16 +10:00

Gracefully handle absent PREFERRED_XML_PARSERS

Newer `feedparser` does not expose this symbol.
This commit is contained in:
Stuart Longland 2020-04-25 08:51:38 +10:00
parent b24ee0bccc
commit 9ee623f6bf
Signed by: stuartl
GPG Key ID: 6AA32EFB18079BAA

View File

@ -39,7 +39,10 @@ if PY3:
# Doesn't seem to work in Python 3. Until further notice, let's # Doesn't seem to work in Python 3. Until further notice, let's
# disable this for now. # disable this for now.
# http://blog.yjl.im/2013/12/workaround-of-libxml2-unsupported.html # http://blog.yjl.im/2013/12/workaround-of-libxml2-unsupported.html
feedparser.PREFERRED_XML_PARSERS.remove('drv_libxml2') try:
feedparser.PREFERRED_XML_PARSERS.remove('drv_libxml2')
except AttributeError:
pass
class FeedEntry(object): class FeedEntry(object):