[Twisted-Python] Problem with Jelly

Jean-Paul Calderone exarkun at divmod.com
Sun Apr 27 09:34:47 EDT 2008

On Sun, 27 Apr 2008 12:07:37 +0100, Simon Pickles <sipickles at hotmail.com> wrote:
> [snip]
>I kept adding complexity to TestJelly, approaching the structure of my 
>GameObject class. It failed (with the InsecureJelly:method error) when I 
>needed to make the passed class type an inherited one.
>I realised that GameObject is a subclass of Actor, and calls 
>Actor.__init__() in its own __init__.
>So I tried making the actor jellyable too by doing this:
>import stackless
>from log import logger
>from twisted.spread import pb
>class Actor:
>    def __init__(self, ch, logFunction):
>        self.rx = ch
>        self.logger = logFunction
>        self.processMessageMethod = self.MessageHandler

What are these three attributes?  `self.rx´, `self.logger´, and
`self.processMessageMethod´ have to be jellyable if you want to
mix `Actor´ into a class that you are going to jelly.  If these
attributes aren't supposed to be sent to the peer, then you need
to provide custom jellying logic to exclude them.


More information about the Twisted-Python mailing list