eric6/E5Network/E5XmlRpcClient.py

Sat, 27 Feb 2021 12:08:23 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sat, 27 Feb 2021 12:08:23 +0100
changeset 8138
169e65a6787c
parent 7923
91e843545d9a
child 8143
2c730d5fd177
permissions
-rw-r--r--

Shell: added functionality to show a prompt when the main client process has exited (e.g. a script ended).

4258
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
7923
91e843545d9a Updated copyright for 2021.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7780
diff changeset
3 # Copyright (c) 2015 - 2021 Detlev Offenbach <detlev@die-offenbachs.de>
4258
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing a xmlrpc client for Qt.
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
7192
a22eee00b052 Started removing runtime support for Python2 and PyQt4.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
10 import xmlrpc.client as xmlrpc
4258
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
11
7771
787a6b3f8c9f Optimized the use of Waiting Cursors by using a specialized context manager class.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7628
diff changeset
12 from PyQt5.QtCore import Qt, QObject, QUrl, QByteArray, QEventLoop
787a6b3f8c9f Optimized the use of Waiting Cursors by using a specialized context manager class.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7628
diff changeset
13 from PyQt5.QtGui import QGuiApplication, QCursor
7253
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
14 from PyQt5.QtNetwork import (
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
15 QNetworkAccessManager, QNetworkRequest, QNetworkReply
50dbe65a1334 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
16 )
4258
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 from E5Network.E5NetworkProxyFactory import proxyAuthenticationRequired
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19 try:
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20 from E5Network.E5SslErrorHandler import E5SslErrorHandler
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
21 SSL_AVAILABLE = True
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 except ImportError:
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 SSL_AVAILABLE = False
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 class E5XmlRpcClient(QObject):
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 """
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 Class implementing a xmlrpc client for Qt.
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 """
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 def __init__(self, url, parent=None):
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31 """
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 Constructor
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
34 @param url xmlrpc handler URL (string or QUrl)
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 @param parent parent object (QObject)
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36 """
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37 super(E5XmlRpcClient, self).__init__(parent)
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
38
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
39 # attributes for the network objects
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 self.__networkManager = QNetworkAccessManager(self)
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 self.__networkManager.proxyAuthenticationRequired.connect(
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42 proxyAuthenticationRequired)
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
43 self.__networkManager.finished.connect(self.__replyFinished)
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 if SSL_AVAILABLE:
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
45 self.__sslErrorHandler = E5SslErrorHandler(self)
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
46 self.__networkManager.sslErrors.connect(self.__sslErrors)
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
47
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48 self.__callmap = {}
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
49
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50 self.__request = QNetworkRequest(QUrl(url))
4326
e52318f11812 Change code to make eric compatible to PyQt 5.5 (QByteArry issue).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4258
diff changeset
51 self.__request.setRawHeader(b"User-Agent", b"E5XmlRpcClient/1.0")
4258
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
52 self.__request.setHeader(QNetworkRequest.ContentTypeHeader, "text/xml")
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
53
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
54 def setUrl(self, url):
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
55 """
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
56 Public slot to set the xmlrpc handler URL.
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
57
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
58 @param url xmlrpc handler URL (string or QUrl)
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
59 """
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
60 url = QUrl(url)
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
61 if url.isValid():
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
62 self.__request.setUrl(url)
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
63
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
64 def call(self, method, args, responseCallback, errorCallback):
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
65 """
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
66 Public method to call the remote server.
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
67
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
68 @param method name of the remote method to be called (string)
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
69 @param args tuple of method arguments (tuple)
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
70 @param responseCallback method to be called with the returned
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
71 result as a tuple (function)
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
72 @param errorCallback method to be called in case of an error
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
73 with error code and error string (function)
7628
f904d0eef264 Checked the reported security related issue reports generated by the new security checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
74 @exception TypeError raised to indicate an illegal 'args' parameter
f904d0eef264 Checked the reported security related issue reports generated by the new security checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
75 type
4258
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
76 """
7628
f904d0eef264 Checked the reported security related issue reports generated by the new security checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
77 if not isinstance(args, tuple):
f904d0eef264 Checked the reported security related issue reports generated by the new security checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7360
diff changeset
78 raise TypeError("argument 'args' must be tuple")
4258
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
79
7771
787a6b3f8c9f Optimized the use of Waiting Cursors by using a specialized context manager class.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7628
diff changeset
80 QGuiApplication.setOverrideCursor(QCursor(Qt.WaitCursor))
787a6b3f8c9f Optimized the use of Waiting Cursors by using a specialized context manager class.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7628
diff changeset
81 QGuiApplication.processEvents(QEventLoop.ExcludeUserInputEvents)
787a6b3f8c9f Optimized the use of Waiting Cursors by using a specialized context manager class.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7628
diff changeset
82
4258
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
83 data = xmlrpc.dumps(args, method).encode("utf-8")
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
84 reply = self.__networkManager.post(
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
85 self.__request, QByteArray(data))
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
86 self.__callmap[reply] = (responseCallback, errorCallback)
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
87
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
88 def abort(self):
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89 """
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
90 Public method to abort all calls.
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
91 """
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
92 for reply in list(self.__callmap):
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
93 if reply.isRunning():
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
94 reply.abort()
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
95
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
96 def __sslErrors(self, reply, errors):
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
97 """
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
98 Private slot to handle SSL errors.
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
99
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
100 @param reply reference to the reply object (QNetworkReply)
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
101 @param errors list of SSL errors (list of QSslError)
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
102 """
7771
787a6b3f8c9f Optimized the use of Waiting Cursors by using a specialized context manager class.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7628
diff changeset
103 QGuiApplication.restoreOverrideCursor()
787a6b3f8c9f Optimized the use of Waiting Cursors by using a specialized context manager class.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7628
diff changeset
104 QGuiApplication.processEvents(QEventLoop.ExcludeUserInputEvents)
787a6b3f8c9f Optimized the use of Waiting Cursors by using a specialized context manager class.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7628
diff changeset
105
4258
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
106 ignored = self.__sslErrorHandler.sslErrorsReply(reply, errors)[0]
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
107 if ignored == E5SslErrorHandler.NotIgnored and reply in self.__callmap:
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
108 self.__callmap[reply][1](xmlrpc.TRANSPORT_ERROR, self.tr(
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
109 "SSL Error"))
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
110
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
111 def __replyFinished(self, reply):
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
112 """
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
113 Private slot handling the receipt of a reply.
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
114
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
115 @param reply reference to the finished reply (QNetworkReply)
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
116 """
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
117 if reply not in self.__callmap:
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
118 return
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
119
7771
787a6b3f8c9f Optimized the use of Waiting Cursors by using a specialized context manager class.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7628
diff changeset
120 QGuiApplication.restoreOverrideCursor()
787a6b3f8c9f Optimized the use of Waiting Cursors by using a specialized context manager class.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7628
diff changeset
121 QGuiApplication.processEvents(QEventLoop.ExcludeUserInputEvents)
787a6b3f8c9f Optimized the use of Waiting Cursors by using a specialized context manager class.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7628
diff changeset
122
4258
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
123 if reply.error() != QNetworkReply.NoError:
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
124 self.__callmap[reply][1](xmlrpc.TRANSPORT_ERROR,
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
125 reply.errorString())
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
126 else:
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
127 data = bytes(reply.readAll()).decode("utf-8")
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
128 try:
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
129 data = xmlrpc.loads(data)[0]
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
130 self.__callmap[reply][0](data)
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
131 except xmlrpc.Fault as fault:
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
132 self.__callmap[reply][1](fault.faultCode, fault.faultString)
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
133
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
134 reply.deleteLater()
d141e2bb94cc Added a Qt based xmlrpc client.
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
135 del self.__callmap[reply]

eric ide

mercurial