utils/web.py: Properly import chardet.

This commit is contained in:
Valentin Lorentz 2013-06-12 17:38:50 +00:00
parent 8095f34250
commit a82ad9cb1a
1 changed files with 1 additions and 1 deletions

View File

@ -190,7 +190,7 @@ def htmlToText(s, tagReplace=' '):
"""Turns HTML into text. tagReplace is a string to replace HTML tags with.
"""
try:
import chardet
import chardet.universaldetector
except ImportError:
s = s.decode('utf8')
else: