3
0
mirror of https://github.com/jlu5/PyLink.git synced 2024-12-25 04:02:45 +01:00

pr/insp: don't raise KeyError when removing channel from user fails

This commit is contained in:
James Lu 2015-07-16 16:48:54 -07:00
parent 2a586a6dba
commit 73c625a429

View File

@ -353,7 +353,7 @@ def handle_part(irc, source, command, args):
channel = args[0].lower() channel = args[0].lower()
# We should only get PART commands for channels that exist, right?? # We should only get PART commands for channels that exist, right??
irc.channels[channel].removeuser(source) irc.channels[channel].removeuser(source)
irc.users[source].channels.remove(channel) irc.users[source].channels.discard(channel)
try: try:
reason = args[1] reason = args[1]
except IndexError: except IndexError: