diff options
author | miwi <miwi@FreeBSD.org> | 2014-05-22 18:17:41 +0800 |
---|---|---|
committer | miwi <miwi@FreeBSD.org> | 2014-05-22 18:17:41 +0800 |
commit | 508afcffd0fa4f54a05be669ef9ee2d9676ff4b6 (patch) | |
tree | a1537c6bd4fdd957cdbd84d138f09d44e161c6c9 | |
parent | eb300b5885188414ca70b0c1d6070adcee0b22cf (diff) | |
download | freebsd-ports-gnome-508afcffd0fa4f54a05be669ef9ee2d9676ff4b6.tar.gz freebsd-ports-gnome-508afcffd0fa4f54a05be669ef9ee2d9676ff4b6.tar.zst freebsd-ports-gnome-508afcffd0fa4f54a05be669ef9ee2d9676ff4b6.zip |
- 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
-rw-r--r-- | textproc/py-feedparser/Makefile | 2 | ||||
-rw-r--r-- | textproc/py-feedparser/files/patch-feedparser_feedparser.py | 15 |
2 files changed, 16 insertions, 1 deletions
diff --git a/textproc/py-feedparser/Makefile b/textproc/py-feedparser/Makefile index 0789d3fda596..87c82397d326 100644 --- a/textproc/py-feedparser/Makefile +++ b/textproc/py-feedparser/Makefile @@ -3,7 +3,7 @@ PORTNAME= feedparser PORTVERSION= 5.1.3 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= textproc python MASTER_SITES= CHEESESHOP PKGNAMEPREFIX= ${PYTHON_PKGNAMEPREFIX} diff --git a/textproc/py-feedparser/files/patch-feedparser_feedparser.py b/textproc/py-feedparser/files/patch-feedparser_feedparser.py new file mode 100644 index 000000000000..ce94600671a2 --- /dev/null +++ b/textproc/py-feedparser/files/patch-feedparser_feedparser.py @@ -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'): |