Can't define an empty word.

This commit is contained in:
Jeremy Fincher 2004-08-31 18:23:47 +00:00
parent 86c7743fc9
commit ead683b269
2 changed files with 3 additions and 1 deletions

View File

@ -126,6 +126,8 @@ class Dict(callbacks.Privmsg):
'dictionary: %s.', msg.args[0], default)
dictionary = '*'
word = privmsgs.getArgs(args)
if not word:
irc.error('You must give a word to define.', Raise=True)
definitions = conn.define(dictionary, word)
dbs = sets.Set()
if not definitions:

View File

@ -37,7 +37,7 @@ if network:
def testDict(self):
self.assertNotError('dict slash')
self.assertNotRegexp('dict web1913 slash', 'foldoc')
self.assertNotError('dict ""')
self.assertError('dict ""')
def testDictionaries(self):
self.assertNotError('dictionaries')