[IMP] lower case _LOGGER and log some more exception details

This commit is contained in:
Stéphane Bidoul
2015-07-20 18:57:34 +02:00
parent eb2693c1d7
commit bdd4e838c2
5 changed files with 17 additions and 14 deletions

View File

@@ -23,7 +23,7 @@ from openerp import models
from .camt import CamtParser as Parser
_LOGGER = logging.getLogger(__name__)
_logger = logging.getLogger(__name__)
class AccountBankStatementImport(models.TransientModel):
@@ -34,10 +34,11 @@ class AccountBankStatementImport(models.TransientModel):
"""Parse a CAMT053 XML file."""
parser = Parser()
try:
_LOGGER.debug("Try parsing with camt.")
_logger.debug("Try parsing with camt.")
return parser.parse(data_file)
except ValueError:
# Not a camt file, returning super will call next candidate:
_LOGGER.debug("Statement file was not a camt file.")
_logger.debug("Statement file was not a camt file.",
exc_info=True)
return super(AccountBankStatementImport, self)._parse_file(
cr, uid, data_file, context=context)