Fix crash on empty html pages

Was due to "chardet" returning "None", which then crashed "str.replace"
master
pictuga 2013-11-16 16:00:07 +01:00
parent 6975772ef9
commit 417609c1f0
1 changed files with 1 additions and 1 deletions

View File

@ -278,7 +278,7 @@ def decodeHTML(data, con=None):
enc = chardet.detect(data)['encoding']
log(enc)
return data.decode(enc, 'replace')
return data.decode(enc, 'replace') if enc else data
def Fix(item, feedurl='/'):
""" Improves feed items (absolute links, resolve feedburner links, etc) """