X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=xmlrpcclient.py;h=7b50917df8b63243c3056e886d13a014cff28a2c;hb=c1b5a9ab09dcbbae0e99caeb26809429a5d17ebd;hp=5c8f3cf2565329cc235cf9f598e296c86eb3abd4;hpb=e04df494d939e3bb644f788a02123ec05f4c8df4;p=quix0rs-apt-p2p.git diff --git a/xmlrpcclient.py b/xmlrpcclient.py index 5c8f3cf..7b50917 100644 --- a/xmlrpcclient.py +++ b/xmlrpcclient.py @@ -23,7 +23,11 @@ class XMLRPCClient(HTTPClient): print "response decode error: " + `e` self.d.errback() else: - apply(self.d.callback, args) + l = [] + for i in args: + l.append(i) + l.append({'host' : self.transport.getHost()[1]}) + apply(self.d.callback, (l,)) class XMLRPCClientFactory(ClientFactory): def __init__(self, method, args, callback=None, errback=None): @@ -41,3 +45,6 @@ class XMLRPCClientFactory(ClientFactory): prot.args = self.args prot.d = self.d return prot + + def clientConnectionFailed(self, connector, reason): + self.d.errback() \ No newline at end of file