From bb8891f32f5a79003f34d1a94d3bb0345b307dd6 Mon Sep 17 00:00:00 2001 From: AdriNicolau Date: Fri, 7 Feb 2020 09:30:19 +0100 Subject: [PATCH] Handle Int faultCodes. --- bin/rpc.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bin/rpc.py b/bin/rpc.py index 2107edf..d0b0d28 100644 --- a/bin/rpc.py +++ b/bin/rpc.py @@ -238,6 +238,10 @@ def rpc_exec_auth(self, obj, method, *args): if isinstance(e, xmlrpclib.Fault) \ or isinstance(e, tiny_socket.Myexception): a = rpc_exception(e.faultCode, e.faultString) + if isinstance(e.faultCode, int): + a.type = 'UserError' + a.message = 'Error %s' % e.faultCode + a.data = e.faultString if a.type in ('warning','UserError'): if a.message in ('ConcurrencyException') and len(args) > 4: if common.concurrency(args[0], args[2][0], args[4]):