[Twisted-Python] (conch) credentials.signature always None?

Saúl Ibarra Corretgé saghul at gmail.com
Thu Jan 20 01:56:51 EST 2011


On Thu, Jan 20, 2011 at 6:18 AM, Glyph Lefkowitz
<glyph at twistedmatrix.com> wrote:
> On Jan 19, 2011, at 8:10 PM, Saúl Ibarra Corretgé wrote:
>
> I fixed it by doing the following:
>
>    def _got_keys_error(self, error, credentials):
>        if not error.check(ValidPublicKey):
>            return failure.Failure(ConchError(error.getErrorMessage()))
>
> Are you sure that's what you want?  If you just say "I don't want to handle
> anything except FooError", i.e. the asynchronous equivalent to "except
> FooError", it's like this:
> def myErrback(self, f):
>     f.trap(FooError)
>     # ... handle it ...
>

In this case I could get here (the errback) for several reasons,
depending on the DB backend, for example. I guess I could trap and all
the cases but ValidPrivateKey, but in this case I know for sure I want
ValidPrivateKey to be ignored, that's why I reversed the order. Or am
I missing something here?

Thanks!

-- 
/Saúl
http://saghul.net | http://sipdoc.net



More information about the Twisted-Python mailing list