[FIX] tools.convert: use tools.ustr() instead of str() on exceptions.
authorVo Minh Thu <vmt@openerp.com>
Mon, 25 Feb 2013 16:40:28 +0000 (17:40 +0100)
committerVo Minh Thu <vmt@openerp.com>
Mon, 25 Feb 2013 16:40:28 +0000 (17:40 +0100)
bzr revid: vmt@openerp.com-20130225164028-d48k5yheuoph1vm3

openerp/tools/convert.py

index a06a308..59e6651 100644 (file)
@@ -848,7 +848,7 @@ form: module.record_id""" % (xml_id,)
                     except Exception, e:
                         self.cr.rollback()
                         exc_info = sys.exc_info()
-                        raise ParseError, (str(e), etree.tostring(rec).rstrip(), rec.getroottree().docinfo.URL, rec.sourceline), exc_info[2]
+                        raise ParseError, (misc.ustr(e), etree.tostring(rec).rstrip(), rec.getroottree().docinfo.URL, rec.sourceline), exc_info[2]
         return True
 
     def __init__(self, cr, module, idref, mode, report=None, noupdate=False):