From 048db92e65ac2e6a815d101cc66eef7f9bd1e99b Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Tue, 27 Jan 2004 00:42:17 +0000 Subject: [PATCH] Fixed no-help case in Config.help. --- src/Config.py | 5 ++++- test/test_Config.py | 4 ++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/Config.py b/src/Config.py index 58a871d19..fdc46c124 100644 --- a/src/Config.py +++ b/src/Config.py @@ -153,7 +153,10 @@ class Config(callbacks.Privmsg): """ name = privmsgs.getArgs(args) 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): """ diff --git a/test/test_Config.py b/test/test_Config.py index ad63f1f15..41ca59a62 100644 --- a/test/test_Config.py +++ b/test/test_Config.py @@ -51,6 +51,10 @@ class ConfigTestCase(ChannelPluginTestCase): self.assertError('config help supybot.alsdkfj') 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: