mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-09-18 21:50:56 +00:00
Fixing inane bug in feedparser when there isn't data but it's still trying to do character encoding detection. Should be fixed upstream.
This commit is contained in:
parent
3a95882c48
commit
7dedeaaa6c
1 changed files with 1 additions and 1 deletions
|
@ -3739,7 +3739,7 @@ def convert_to_utf8(http_headers, data):
|
|||
known_encoding = 0
|
||||
chardet_encoding = None
|
||||
tried_encodings = []
|
||||
if chardet:
|
||||
if chardet and data:
|
||||
chardet_encoding = unicode(chardet.detect(data)['encoding'], 'ascii', 'ignore')
|
||||
# try: HTTP encoding, declared XML encoding, encoding sniffed from BOM
|
||||
for proposed_encoding in (rfc3023_encoding, xml_encoding, bom_encoding,
|
||||
|
|
Loading…
Add table
Reference in a new issue