summaryrefslogtreecommitdiff
path: root/addons/document/std_index.py
diff options
context:
space:
mode:
authorJiten (OpenERP) <jra@tinyerp.com>2012-06-27 13:25:08 +0530
committerJiten (OpenERP) <jra@tinyerp.com>2012-06-27 13:25:08 +0530
commit18dd2dfcab7ee866f5e344ea5c26d4e78faba2f2 (patch)
tree068dcc026be4048b1bf56df1c6a61a28dcf34b0c /addons/document/std_index.py
parentea46eb264517fac17720f3a9a524c766e891ac1d (diff)
parent6c0bdc167b1c6a5b2cbb36a045bfd1abc1cd121a (diff)
[MERGE] Merged from openobject-addons.
bzr revid: jra@tinyerp.com-20120627075508-kko9c9dr67695hzw
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..49ac9a5c906 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())