mirror of
http://aero2k.de/t/repos/urlbot-native.git
synced 2017-09-06 15:25:38 +02:00
improve 'invalid charset' logging
This commit is contained in:
@@ -75,7 +75,7 @@ def extract_title(url):
|
|||||||
try:
|
try:
|
||||||
html_text = html_text.decode(charset)
|
html_text = html_text.decode(charset)
|
||||||
except LookupError:
|
except LookupError:
|
||||||
log.warn('invalid charset in ' + headers['content-type'])
|
log.warn("invalid charset in '%s': '%s'" % (headers['content-type'], charset))
|
||||||
|
|
||||||
if str != type(html_text):
|
if str != type(html_text):
|
||||||
html_text = str(html_text)
|
html_text = str(html_text)
|
||||||
|
|||||||
Reference in New Issue
Block a user