* no-prefered-xml-parser:
feed: Disable feedparser's PREFERRED_XML_PARSERS
Signed-off-by: W. Trevor King <wking@tremily.us>
del e # cleanup namespace
_SOCKET_ERRORS = tuple(_SOCKET_ERRORS)
+ # drv_libxml2 raises:
+ # TypeError: 'str' does not support the buffer interface
+ _feedparser.PREFERRED_XML_PARSERS = []
+
class Feed (object):
"""Utility class for feed manipulation and storage.
elif isinstance(exc, _sax.SAXParseException):
_LOG.error('sax parsing error: {}: {}'.format(exc, self))
warned = True
+ elif (parsed.bozo and
+ isinstance(exc, _feedparser.CharacterEncodingOverride)):
+ _LOG.warning(
+ 'incorrectly declared encoding: {}: {}'.format(exc, self))
+ warned = True
elif parsed.bozo or exc:
if exc is None:
exc = "can't process"