mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-26 20:59:27 +01:00
Can't define an empty word.
This commit is contained in:
parent
86c7743fc9
commit
ead683b269
@ -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:
|
||||
|
@ -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')
|
||||
|
Loading…
Reference in New Issue
Block a user