[FIX] Logger notification improved

bzr revid: jvo@tinyerp.com-20090729133649-clmwpd8wfbrrxbsl
This commit is contained in:
Jay (Open ERP) 2009-07-29 19:06:49 +05:30
parent 0d6d1c4c6d
commit ed3234e3c0
2 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ def _check_xml(self, cr, uid, ids, context={}):
if not relaxng.validate(eview):
logger = netsvc.Logger()
logger.notifyChannel('init', netsvc.LOG_ERROR, 'The view does not fit the required schema !')
logger.notifyChannel('init', netsvc.LOG_ERROR, relaxng.error_log.last_error)
logger.notifyChannel('init', netsvc.LOG_ERROR, tools.ustr(relaxng.error_log.last_error))
return False
return True

View File

@ -876,7 +876,7 @@ def convert_xml_import(cr, module, xmlfile, idref=None, mode='init', noupdate=Fa
except Exception, e:
logger = netsvc.Logger()
logger.notifyChannel('init', netsvc.LOG_ERROR, 'The XML file does not fit the required schema !')
logger.notifyChannel('init', netsvc.LOG_ERROR, relaxng.error_log.last_error)
logger.notifyChannel('init', netsvc.LOG_ERROR, tools.ustr(relaxng.error_log.last_error))
raise
if idref is None: