[Twisted-Python] Can't check elements without uri in twisted.words.xish.domish.Element

2013-09-04 Thread Goffi
G'day, in the method elements of twisted.words.xish.domish.Element, the function generateElementsQNamed is called event if the uri if None, so the uri is checked against None instead of not checked at all. I think the function generateElementsNamed should be called instead, it looks like a

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:

[Twisted-Python] Asynchronously reading posted data

2013-09-04 Thread Paul Wiseman
I'm still pretty new to twisted and feel I'm slowly getting the hang of it, enough to realise that this line of code is probably going to block and not do me any favours, the line is the first line in a resource.Resource render_POST. json_request = json.loads(request.content.read()) The