Skip to content

Commit

Permalink
[openerp] FIX: Correctly handle xmlrpclib.Fault
Browse files Browse the repository at this point in the history
  • Loading branch information
Yenthe666 committed Jan 16, 2018
1 parent 11c73cd commit 11af4c0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion openerp/service/wsgi_server.py
Expand Up @@ -65,7 +65,7 @@ def xmlrpc_return(start_response, service, method, params, string_faultcode=Fals

def xmlrpc_handle_exception_int(e):
if isinstance(e, openerp.exceptions.UserError):
fault = xmlrpclib.Fault(RPC_FAULT_CODE_WARNING, openerp.tools.ustr(e.value))
fault = xmlrpclib.Fault(RPC_FAULT_CODE_WARNING, openerp.tools.ustr(e.name))
response = xmlrpclib.dumps(fault, allow_none=False, encoding=None)
elif isinstance(e, openerp.exceptions.RedirectWarning):
fault = xmlrpclib.Fault(RPC_FAULT_CODE_WARNING, str(e))
Expand Down

0 comments on commit 11af4c0

Please sign in to comment.