Re: [Twisted-Python] Passing additional arguments to errback

2013-09-06 Thread Maciej Wasilak
Hello, just one more question: Well, yes, you should, but still keep in mind that you can actually just pass the request like so: .addErrback(handleErrors, request) You don't really have to save the request itself anywhere as an attribute. if I understand correctly, when I put this

Re: [Twisted-Python] Passing additional arguments to errback

2013-09-06 Thread Phil Mayers
Maciej Wasilak wasi...@gmail.com wrote: Hello, just one more question: Well, yes, you should, but still keep in mind that you can actually just pass the request like so: .addErrback(handleErrors, request) You don't really have to save the request itself anywhere as an attribute. if I

Re: [Twisted-Python] Passing additional arguments to errback

2013-09-05 Thread Maciej Wasilak
Laurens, You don't have to do it from in there. You can do .addErrback(handleErrors, request), since it's all the same request object, right? Aaargh! I see the problem now. I wrote everything as part of the Protocol class (DD - DeferredsDictionaries), when I should have extracted request

Re: [Twisted-Python] Passing additional arguments to errback

2013-09-05 Thread Laurens Van Houtven
On Thu, Sep 5, 2013 at 12:00 PM, Maciej Wasilak wasi...@gmail.com wrote: Laurens, You don't have to do it from in there. You can do .addErrback(handleErrors, request), since it's all the same request object, right? Aaargh! I see the problem now. I wrote everything as part of the

Re: [Twisted-Python] Passing additional arguments to errback

2013-09-04 Thread Laurens Van Houtven
Cześć Maciek :) In general, you can pass extra arguments when you call addCallback(s) or addErrback. They will get passed to the callback. However, as a side note to that code example, do you understand the difference between .addCallbacks(cb, eb) and: .addCallback(cb).addErrback(eb) and: