discard from set to ignore KeyError

This commit is contained in:
Brian S. Stephan 2021-05-06 09:29:26 -05:00
parent 3fe0a8e59e
commit a550bf07ac
1 changed files with 1 additions and 1 deletions

View File

@ -152,7 +152,7 @@ class History(Plugin):
def _remove_channel_participant(self, where, who):
"""Remove the specified who from the where channel's participants list."""
participants = self.channel_participants.setdefault(where, set())
participants.remove(who)
participants.discard(who)
logger.debug("participants for %s: %s", where, participants)