Fixed no-help case in Config.help.

This commit is contained in:
Jeremy Fincher 2004-01-27 00:42:17 +00:00
parent 5b4b7f2e4b
commit 048db92e65
2 changed files with 8 additions and 1 deletions

View File

@ -153,7 +153,10 @@ class Config(callbacks.Privmsg):
""" """
name = privmsgs.getArgs(args) name = privmsgs.getArgs(args)
wrapper = getWrapper(name) wrapper = getWrapper(name)
irc.reply(wrapper.help) if wrapper.help:
irc.reply(wrapper.help)
else:
irc.error('%s has no help.' % name)
def default(self, irc, msg, args): def default(self, irc, msg, args):
"""<name> """<name>

View File

@ -51,6 +51,10 @@ class ConfigTestCase(ChannelPluginTestCase):
self.assertError('config help supybot.alsdkfj') self.assertError('config help supybot.alsdkfj')
self.assertNotError('config help supybot.replies.success') self.assertNotError('config help supybot.replies.success')
def testHelpDoesNotAssertionError(self):
self.assertNotRegexp('config help supybot.commands.defaultPlugins.help',
'AssertionError')
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: # vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78: