def _logout(self): if self.source_name: SourceSocketHandler.remove_source(self.source_name) SourceSocketHandler.send_updates() self.auth = False self.source_name = ''
def _login(self, source_name): self.auth = True self.source_name = source_name SourceSocketHandler.add_source(source_name) SourceSocketHandler.send_updates()