[Twisted-Python] Must avatarId always be a string?

Itamar Turner-Trauring itamar at futurefoundries.com
Sun Jan 13 09:10:57 EST 2013


On Sun, Jan 13, 2013 at 9:08 AM, Itamar Turner-Trauring <
itamar at futurefoundries.com> wrote:

>
>     @inlineCallbacks
>     def login(self, *args, **kwargs):
>         for portal in self.portals:
>             try:
>                 return portal.login(*args, **kwargs)
>             except:
>                 continue
>         # Ran out of portals, failed to login:
>         raise Unauthorized()
>

Sigh. Make that:

    @inlineCallbacks
    def login(self, *args, **kwargs):
        for portal in self.portals:
            try:
                returnValue(yield portal.login(*args, **kwargs))
            except:
                continue
        # Ran out of portals, failed to login:
        raise Unauthorized()
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://twistedmatrix.com/pipermail/twisted-python/attachments/20130113/62916a0d/attachment.htm 


More information about the Twisted-Python mailing list