def unsubscribe(self): def remove_it(r, sid): self.debug("remove subscription for %s", self.id) self.set_sid(None) self.debug("unsubscribe %s", self.id) d = event.unsubscribe(self) d.addCallback(remove_it, self.get_sid()) return d
def unsubscribe(self): def remove_it(r, sid): self.debug("remove subscription for %s", self.id) unsubscribe(self) self.subscription_id = None #global subscribers #if subscribers.has_key(sid): # del subscribers[sid] self.debug("unsubscribe %s", self.id) d = event.unsubscribe(self) d.addCallback(remove_it, self.get_sid()) return d