diff options
| author | Antony Lesuisse <al@openerp.com> | 2012-06-26 23:06:12 +0200 |
|---|---|---|
| committer | Antony Lesuisse <al@openerp.com> | 2012-06-26 23:06:12 +0200 |
| commit | 54ffabf13e4adc8a05afa5fb71e48935459e8630 (patch) | |
| tree | 19d9015107fa1114f1e6068807223742cb0dac4f /addons/document/std_index.py | |
| parent | 7a96ae2a093613d2324b915e35e5d9ec2c86a358 (diff) | |
| parent | 2e7c2174978e0ef73034453efce5a9a404d0a504 (diff) | |
[MERGE] fix warnings and logging
bzr revid: al@openerp.com-20120626210612-o47a2v6tlb9k4212
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..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()) |
