[Twisted-Python] MetaInterface call error
exarkun at intarweb.us
Sun Oct 19 17:49:53 EDT 2003
On Sun, Oct 19, 2003 at 06:43:16PM -0300, Rita D?az y/o Rodrigo Benenson wrote:
> the log crash problem was solved as indicated (thanks !), just had to fix
> the calls to thread.start_new_thread(reactor.run, ()).
> I'm still working to get Khashmir passing the unit tests (again, I suppose).
> After some grumble grumbling I discovered the following funny situation
> (copied from another screen):
> >>> import airhook
> >>> a = airhook.AirhookConnection
> >>> a
> <class 'airhook.AirhookConnection'>
> >>> b = a()
> TypeError: __call__() takes at least 2 arguments (1 given)
> Why __call__? __init__ should be called !
> AirhookConnection is defined as:
> class AirHookConnection(protocol.ConnectedDatagramProtocol,
> def __init__(self):
This seems to be an error. AirHookConnection should not inherit from
IUDPConnectedTransport. It may have worked with a previous version of
Twisted, but doing this was never supported, and won't work with any
reasonably recent release of Twisted. Simply removing it from the base
class list should resolve the issue. If you want to be clean about it, add
this line to the body of the AirHookConnection class definition:
__implements__ = (interfaces.IUDPConnectedTransport,)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: Digital signature
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20031019/627e539c/attachment.pgp
More information about the Twisted-Python