@kiwidude: it is possible that you are being bit by something that got me while developing the new smartdevice driver. It turns out that any plugin can be allocated and its __init__ called more than once. For example, this happened to my driver when I added a book.
The lesson I learned after discussion with Kovid: __init__ must not allocate externally-visible resources or initialize class-level attributes (attributes declared explicitly in the class). In my case I was allocating the listen socket in __init__, an action that blew up in the second __init__. The problem with class-level attributes is that they are static; they exist in memory only once. The second __init__ is changing the value of the same memory used by the first.
|