]> git.mxchange.org Git - quix0rs-apt-p2p.git/blobdiff - xmlrpcclient.py
now we store and retrieve node information from our database...
[quix0rs-apt-p2p.git] / xmlrpcclient.py
index fef7d24ffdaf1fc2e89a090be513e93d1dff564d..f8d33b2fb05d7e5bdf1cf24572fa1595bb486be9 100644 (file)
@@ -18,21 +18,13 @@ class XMLRPCClient(HTTPClient):
         self.transport.write('\r\n')
        
     def handleResponse(self, buf):
-       try:
-           self.thehost = self.transport.getHost()[1]
-       except:
-           self.thehost = None
        try:
            args, name = loads(buf)
        except Exception, e:
            print "response decode error: " + `e`
            self.d.errback()
        else:
-           l = []
-           for i in args:
-               l.append(i)
-           l.append({'host' : self.thehost})
-           apply(self.d.callback, (l,))
+           apply(self.d.callback, args)
 
 class XMLRPCClientFactory(ClientFactory):
     def __init__(self, method, args, callback=None, errback=None):
@@ -43,7 +35,8 @@ class XMLRPCClientFactory(ClientFactory):
            self.d.addCallback(callback)
        if errback:
            self.d.addErrback(errback)
-           
+        self.noisy = 0
+        
     def buildProtocol(self, addr):
         prot =  XMLRPCClient()
        prot.method = self.method