def disconnect(self): self.running = False StatusSource.get_saved_stream(self.source).unregister(self)
def __init__(self, listener, source): self.listener = listener self.source = source self.source_handler = StatusSource.get_saved_stream(source) self.source_handler.register(self) self.running = False