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

Commit

Permalink
Merge pull request #38 from gisce/improve_xmlrpc_fault_handle
Browse files Browse the repository at this point in the history
Handle Int faultCodes
  • Loading branch information
ecarreras authored Feb 7, 2020
2 parents 7d8f102 + bb8891f commit a97bd21
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 @@ -241,6 +241,10 @@ def rpc_exec_auth(self, obj, method, *args):
except Exception, e:
if isinstance(e, (xmlrpclib.Fault, 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 a97bd21

Please sign in to comment.