Date: Thu, 22 May 2014 10:17:41 +0000 (UTC) From: Martin Wilke <miwi@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r354821 - in head/textproc/py-feedparser: . files Message-ID: <201405221017.s4MAHfvI066514@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: miwi Date: Thu May 22 10:17:41 2014 New Revision: 354821 URL: http://svnweb.freebsd.org/changeset/ports/354821 QAT: https://qat.redports.org/buildarchive/r354821/ Log: - Backport a fix for chardet issue which prevents mail/rss2email3 from working correctly on certain environment. PR: 187397 Submitted by: poyopoyo@puripuri.plala.or.jp Approved by: maintainer timeout Added: head/textproc/py-feedparser/files/patch-feedparser_feedparser.py (contents, props changed) Modified: head/textproc/py-feedparser/Makefile Modified: head/textproc/py-feedparser/Makefile ============================================================================== --- head/textproc/py-feedparser/Makefile Thu May 22 10:16:15 2014 (r354820) +++ head/textproc/py-feedparser/Makefile Thu May 22 10:17:41 2014 (r354821) @@ -3,7 +3,7 @@ PORTNAME= feedparser PORTVERSION= 5.1.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= textproc python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} Added: head/textproc/py-feedparser/files/patch-feedparser_feedparser.py ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/textproc/py-feedparser/files/patch-feedparser_feedparser.py Thu May 22 10:17:41 2014 (r354821) @@ -0,0 +1,15 @@ +--- feedparser/feedparser.py.orig 2014-03-10 01:45:12.000000000 +0900 ++++ feedparser/feedparser.py 2014-03-10 01:45:53.000000000 +0900 +@@ -3766,7 +3766,11 @@ + chardet_encoding = None + tried_encodings = [] + if chardet: +- chardet_encoding = unicode(chardet.detect(data)['encoding'] or '', 'ascii', 'ignore') ++ chardet_encoding = chardet.detect(data)['encoding'] ++ if not chardet_encoding: ++ chardet_encoding = '' ++ if not isinstance(chardet_encoding, str): ++ chardet_encoding = str(chardet_encoding, 'ascii', 'ignore') + # try: HTTP encoding, declared XML encoding, encoding sniffed from BOM + for proposed_encoding in (rfc3023_encoding, xml_encoding, bom_encoding, + chardet_encoding, u'utf-8', u'windows-1252', u'iso-8859-2'):
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201405221017.s4MAHfvI066514>