Пример #1
0
    def restore_mutelist(self):
        if not self.username:
            return
        receiver = None
        if self.process:
            receiver = self.process
        elif self.watched_game:
            receiver = self.watched_game

        if not receiver:
            return

        db_string = userdb.get_mutelist(self.username)
        if db_string is None:
            db_string = ""
        # list constructor here is for forward compatibility with python 3.
        muted = list([_f for _f in db_string.strip().split(' ') if _f])
        receiver.restore_mutelist(self.username, muted)
Пример #2
0
    def restore_mutelist(self):
        if not self.username:
            return
        receiver = None
        if self.process:
            receiver = self.process
        elif self.watched_game:
            receiver = self.watched_game

        if not receiver:
            return

        db_string = userdb.get_mutelist(self.username)
        if db_string is None:
            db_string = ""
        # list constructor here is for forward compatibility with python 3.
        muted = list(filter(None, db_string.strip().split(' ')))
        receiver.restore_mutelist(self.username, muted)