Пример #1
0
    def _logout(self):
        if self.source_name:
            SourceSocketHandler.remove_source(self.source_name)
        SourceSocketHandler.send_updates()

        self.auth = False
        self.source_name = ''
Пример #2
0
    def _login(self, source_name):
        self.auth = True
        self.source_name = source_name

        SourceSocketHandler.add_source(source_name)
        SourceSocketHandler.send_updates()