On Thu, Jan 20, 2011 at 6:18 AM, Glyph Lefkowitz
<gl...@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

_______________________________________________
Twisted-Python mailing list
Twisted-Python@twistedmatrix.com
http://twistedmatrix.com/cgi-bin/mailman/listinfo/twisted-python

Reply via email to