]> git.mxchange.org Git - quix0rs-apt-p2p.git/blobdiff - xmlrpcclient.py
more constants
[quix0rs-apt-p2p.git] / xmlrpcclient.py
index 5c8f3cf2565329cc235cf9f598e296c86eb3abd4..7b50917df8b63243c3056e886d13a014cff28a2c 100644 (file)
@@ -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