diff options
| author | Ravish Murari (OpenERP) <rmu@tinyerp.com> | 2012-08-23 17:16:08 +0530 |
|---|---|---|
| committer | Ravish Murari (OpenERP) <rmu@tinyerp.com> | 2012-08-23 17:16:08 +0530 |
| commit | 05acae2e2fe8b72d7b1523fa0dd91a8e7d2ea09f (patch) | |
| tree | 337084f7e348d9a84e2530c2eb8362a5c966d024 /addons/document/std_index.py | |
| parent | c5f7f6ecdf710985f29cc73e310ea1f3852b468d (diff) | |
| parent | 79224ea6722e0f2644239b582d86346f32021c0a (diff) | |
[merge] with latest addons
bzr revid: rmu@tinyerp.com-20120823114608-zerb6vg7l1ckf5mi
Diffstat (limited to 'addons/document/std_index.py')
| -rw-r--r-- | addons/document/std_index.py | 7 |
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()) |
