eric6/E5Network/E5XmlRpcClient.py

changeset 7628
f904d0eef264
parent 7360
9190402e4505
child 7771
787a6b3f8c9f
equal deleted inserted replaced
7626:7f643d41464e 7628:f904d0eef264
69 @param args tuple of method arguments (tuple) 69 @param args tuple of method arguments (tuple)
70 @param responseCallback method to be called with the returned 70 @param responseCallback method to be called with the returned
71 result as a tuple (function) 71 result as a tuple (function)
72 @param errorCallback method to be called in case of an error 72 @param errorCallback method to be called in case of an error
73 with error code and error string (function) 73 with error code and error string (function)
74 @exception TypeError raised to indicate an illegal 'args' parameter
75 type
74 """ 76 """
75 assert isinstance(args, tuple), \ 77 if not isinstance(args, tuple):
76 "argument must be tuple or Fault instance" 78 raise TypeError("argument 'args' must be tuple")
77 79
78 data = xmlrpc.dumps(args, method).encode("utf-8") 80 data = xmlrpc.dumps(args, method).encode("utf-8")
79 reply = self.__networkManager.post( 81 reply = self.__networkManager.post(
80 self.__request, QByteArray(data)) 82 self.__request, QByteArray(data))
81 self.__callmap[reply] = (responseCallback, errorCallback) 83 self.__callmap[reply] = (responseCallback, errorCallback)

eric ide

mercurial