From: burris Date: Sat, 21 Sep 2002 20:38:38 +0000 (+0000) Subject: rpcclient now returns a list containing the return value then a dict currently containing X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=2a3391d7352ad0a364c27f06f0a9339abd312bd1;p=quix0rs-apt-p2p.git rpcclient now returns a list containing the return value then a dict currently containing a key 'host' which is the actual ip address we used to contact the peer that is responding --- diff --git a/xmlrpcclient.py b/xmlrpcclient.py index 8e4cc69..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):