Skip to content

Commit

Permalink
Merge pull request #386 from cerealcable/master
Browse files Browse the repository at this point in the history
Gracefully handle removing user from priv cache
  • Loading branch information
embolalia committed Dec 14, 2013
2 parents 69f2ab9 + 0c76135 commit c24a3f8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion willie/coretasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,13 @@ def track_kick(bot, trigger):
bot.channels.remove(trigger.sender)
del bot.privileges[trigger.sender]
else:
del bot.privileges[trigger.sender][nick]
# Temporary fix to stop KeyErrors from being sent to channel
# The privileges dict may not have all nicks stored at all times
# causing KeyErrors
try:
del bot.privileges[trigger.sender][nick]
except KeyError:
pass


@willie.module.rule('.*')
Expand Down

0 comments on commit c24a3f8

Please sign in to comment.