Skip to content
This repository has been archived by the owner on Nov 21, 2024. It is now read-only.

Commit

Permalink
Handle Int faultCodes.
Browse files Browse the repository at this point in the history
  • Loading branch information
AdriNicolau committed Feb 7, 2020
1 parent 872f0e0 commit bb8891f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions bin/rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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]):
Expand Down

0 comments on commit bb8891f

Please sign in to comment.