[FIX] if Exception 'value' attribute (e.value in this case) is not a string (some...
authorolt@tinyerp.com <>
Fri, 8 Jun 2012 13:47:22 +0000 (15:47 +0200)
committerolt@tinyerp.com <>
Fri, 8 Jun 2012 13:47:22 +0000 (15:47 +0200)
bzr revid: olt@tinyerp.com-20120608134722-raytxpk6o2rux79f

addons/web/common/http.py

index 71a280f..13574d1 100644 (file)
@@ -593,7 +593,7 @@ class LocalConnector(openerplib.Connector):
         except Exception,e:
         # TODO change the except to raise LibException instead of their emulated xmlrpc fault
             if isinstance(e, openerp.osv.osv.except_osv):
-                fault = xmlrpclib.Fault('warning -- ' + e.name + '\n\n' + e.value, '')
+                fault = xmlrpclib.Fault('warning -- ' + str(e.name) + '\n\n' + str(e.value), '')
             elif isinstance(e, openerp.exceptions.Warning):
                 fault = xmlrpclib.Fault('warning -- Warning\n\n' + str(e), '')
             elif isinstance(e, openerp.exceptions.AccessError):