From 0fd29b2bc86eff35de6db88b61dfd9a50df909ee Mon Sep 17 00:00:00 2001 From: Nicolas Delaby <nicolas@nexedi.com> Date: Wed, 5 Jan 2011 13:36:15 +0000 Subject: [PATCH] Catch only ImportError git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42028 20353a03-c40f-0410-a6d1-a30d3c3de9de --- product/ERP5Type/Utils.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/product/ERP5Type/Utils.py b/product/ERP5Type/Utils.py index 9bc8e82f02..a462fed177 100644 --- a/product/ERP5Type/Utils.py +++ b/product/ERP5Type/Utils.py @@ -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 -- 2.30.9