summaryrefslogtreecommitdiff
path: root/addons/document/std_index.py
diff options
context:
space:
mode:
authorMayur Maheshwari (OpenERP) <mma@tinyerp.com>2012-08-27 16:46:50 +0530
committerMayur Maheshwari (OpenERP) <mma@tinyerp.com>2012-08-27 16:46:50 +0530
commitd2bd1148fb21b4e98ab01d33df654dfd1836f5e5 (patch)
treeb23bd569af68d4941084f39fddc3beb42eafda67 /addons/document/std_index.py
parent815ea021d8cec91331c2815cc1a9812a2eb1750c (diff)
parent65f532e00137e8dc6d752449db40b737144bcb0d (diff)
[MERGE]: Merge with lp:openobject-addons
bzr revid: mma@tinyerp.com-20120827111650-8tqzbl959qma1kzb
Diffstat (limited to 'addons/document/std_index.py')
-rw-r--r--addons/document/std_index.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/addons/document/std_index.py b/addons/document/std_index.py
index e153d018bf0..422590e127f 100644
--- a/addons/document/std_index.py
+++ b/addons/document/std_index.py
@@ -25,6 +25,7 @@ import StringIO
import odt2txt
import sys, zipfile, xml.dom.minidom
import logging
+_logger = logging.getLogger(__name__)
def _to_unicode(s):
try:
@@ -101,9 +102,9 @@ class DocIndex(indexer):
(data, _) = pop.communicate()
return _to_unicode(data)
except OSError:
- logger = logging.getLogger('document.DocIndex')
- logger.warn("Failed attempt to execute antiword (MS Word reader). Antiword is necessary to index the file %s of MIME type %s. Detailed error available at DEBUG level.", fname, self._getMimeTypes()[0])
- logger.debug("Trace of the failed file indexing attempt: ", exc_info=True)
+
+ _logger.warn("Failed attempt to execute antiword (MS Word reader). Antiword is necessary to index the file %s of MIME type %s. Detailed error available at DEBUG level.", fname, self._getMimeTypes()[0])
+ _logger.debug("Trace of the failed file indexing attempt.", exc_info=True)
return False
cntIndex.register(DocIndex())