Skip to content

Commit

Permalink
invite: handle expected possible exception [skip ci]
Browse files Browse the repository at this point in the history
Avoids "Unknown error" output to IRC and exception traceback log dump.

Backport of #2151 for 7.1.x maintenance branch. CI skipped as the change
does not touch testable code.
  • Loading branch information
dgw committed Jul 6, 2021
1 parent 1c544f5 commit 7a52c9c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sopel/modules/invite.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,4 +77,7 @@ def invite(bot, trigger):
.format(bot.config.core.help_prefix))
channel = trigger.sender

invite_handler(bot, trigger.nick, user, channel)
try:
invite_handler(bot, trigger.nick, user, channel)
except ValueError as err:
bot.reply('%s' % err)

0 comments on commit 7a52c9c

Please sign in to comment.