mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Handle properly the case where no matching commands were found.
This commit is contained in:
parent
a1c911e954
commit
fc11ff4f24
@ -180,8 +180,11 @@ class Misc(callbacks.Privmsg):
|
||||
else:
|
||||
for name in names:
|
||||
L.append('%s %s' % (name, key))
|
||||
if L:
|
||||
L.sort()
|
||||
irc.reply(msg, utils.commaAndify(L))
|
||||
else:
|
||||
irc.error(msg, 'No appropriate commands were found.')
|
||||
|
||||
def help(self, irc, msg, args):
|
||||
"""[<plugin>] <command>
|
||||
|
@ -142,6 +142,7 @@ class MiscTestCase(ChannelPluginTestCase, PluginDocumentation):
|
||||
|
||||
def testApropos(self):
|
||||
self.assertNotError('apropos f')
|
||||
self.assertError('apropos asldkfjasdlkfja')
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user