Re: [Twisted-Python] Passing extra arguments along callbacks

2011-10-21 Thread Jonathan Ballet
Hi Terry, On Fri, Oct 21, 2011 at 09:50:56PM -0400, Terry Jones wrote: > Hi Jonathan > > > def resolve(ip): > > ptr = '.'.join(ip.split('.')[::-1]) + '.in-addr.arpa' > > return client.lookupPointer(ptr).\ > > addCallback(lambda x: (ip, x)).\ > > addErrback(lambda x

Re: [Twisted-Python] Passing extra arguments along callbacks

2011-10-21 Thread Terry Jones
Hi Jonathan > def resolve(ip): > ptr = '.'.join(ip.split('.')[::-1]) + '.in-addr.arpa' > return client.lookupPointer(ptr).\ > addCallback(lambda x: (ip, x)).\ > addErrback(lambda x: (ip, x)) Your errback isn't raising and isn't returning a Failure, so the processin

[Twisted-Python] Passing extra arguments along callbacks

2011-10-21 Thread Jonathan Ballet
Hello, I'm trying to play a little bit with Twisted to discover how it works and I thought it was a nice exercise with the following case. I have a list of IP addresses that I want to get the reverse DNS value. I'm using the answer provided by JP at http://twistedmatrix.com/pipermail/twisted-pyth