mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 02:49:27 +01:00
callbacks: Properly handle nested command errors
Using Raise=True was only papering over the real problem in the nested
command error handling. The actual issue is that we were trying to
return an IrcMsg from NestedCommandsIrcProxy.__init__. Dropping
Raise=True and moving return to its own line is the correct fix and
resolves the test failure in testMaximumNestingDepth.
This commit reverts 7838cae3bc
Signed-off-by: James McCoy <vega.james@gmail.com>
This commit is contained in:
parent
27ffff7ad6
commit
3d993a0cab
@ -587,8 +587,9 @@ class NestedCommandsIrcProxy(ReplyIrcProxy):
|
|||||||
if maxNesting and self.nested > maxNesting:
|
if maxNesting and self.nested > maxNesting:
|
||||||
log.warning('%s attempted more than %s levels of nesting.',
|
log.warning('%s attempted more than %s levels of nesting.',
|
||||||
self.msg.prefix, maxNesting)
|
self.msg.prefix, maxNesting)
|
||||||
return self.error('You\'ve attempted more nesting than is '
|
self.error('You\'ve attempted more nesting than is '
|
||||||
'currently allowed on this bot.', Raise=True)
|
'currently allowed on this bot.')
|
||||||
|
return
|
||||||
# The deepcopy here is necessary for Scheduler; it re-runs already
|
# The deepcopy here is necessary for Scheduler; it re-runs already
|
||||||
# tokenized commands. There's a possibility a simple copy[:] would
|
# tokenized commands. There's a possibility a simple copy[:] would
|
||||||
# work, but we're being careful.
|
# work, but we're being careful.
|
||||||
|
Loading…
Reference in New Issue
Block a user