[FIX] prevent exception to be raised during exception handling
Prevent this kind of exception to happen:
File "/odoo_src/saas-6/openerp/service/wsgi_server.py", line 123, in xmlrpc_handle_exception_string
fault = xmlrpclib.Fault('warning -- ' + e.name + '\n\n' + e.value, '')
TypeError: cannot concatenate 'str' and 'NoneType' objects
This commit is contained in:
@@ -120,7 +120,7 @@ def xmlrpc_handle_exception_int(e):
|
||||
|
||||
def xmlrpc_handle_exception_string(e):
|
||||
if isinstance(e, openerp.exceptions.UserError):
|
||||
fault = xmlrpclib.Fault('warning -- ' + e.name + '\n\n' + e.value, '')
|
||||
fault = xmlrpclib.Fault('warning -- %s\n\n%s' % (e.name, e.value), '')
|
||||
response = xmlrpclib.dumps(fault, allow_none=False, encoding=None)
|
||||
elif isinstance(e, openerp.exceptions.RedirectWarning):
|
||||
fault = xmlrpclib.Fault('warning -- Warning\n\n' + str(e), '')
|
||||
|
||||
Reference in New Issue
Block a user