Commit 0fd29b2b authored by Nicolas Delaby's avatar Nicolas Delaby

Catch only ImportError

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42028 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8402efee
......@@ -3282,7 +3282,7 @@ def guessEncodingFromText(data, content_type='text/html'):
chardet = None
try:
import magic
except:
except ImportError:
magic = None
if chardet is not None and content_type == 'text/html':
# chardet works fine on html document
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment