Closed ghost closed 9 months ago
The try
block is a little too wide. eg. it would catch KeyError
raised by an incorrect translation of the string in format_ratelimit
.
Could you rewrite it like this?
try:
user = ircdb.users.getUser(record.user)
except KeyError: # nonexistent user
continue
else:
users.append('%s: %s' % (user.name,
format_ratelimit(record)))
this can happen if a user that had rate limits set up got unregistered.