mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +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: %s.', msg.args[0], default)
|
||||||
dictionary = '*'
|
dictionary = '*'
|
||||||
word = privmsgs.getArgs(args)
|
word = privmsgs.getArgs(args)
|
||||||
|
if not word:
|
||||||
|
irc.error('You must give a word to define.', Raise=True)
|
||||||
definitions = conn.define(dictionary, word)
|
definitions = conn.define(dictionary, word)
|
||||||
dbs = sets.Set()
|
dbs = sets.Set()
|
||||||
if not definitions:
|
if not definitions:
|
||||||
|
@ -37,7 +37,7 @@ if network:
|
|||||||
def testDict(self):
|
def testDict(self):
|
||||||
self.assertNotError('dict slash')
|
self.assertNotError('dict slash')
|
||||||
self.assertNotRegexp('dict web1913 slash', 'foldoc')
|
self.assertNotRegexp('dict web1913 slash', 'foldoc')
|
||||||
self.assertNotError('dict ""')
|
self.assertError('dict ""')
|
||||||
|
|
||||||
def testDictionaries(self):
|
def testDictionaries(self):
|
||||||
self.assertNotError('dictionaries')
|
self.assertNotError('dictionaries')
|
||||||
|
Loading…
Reference in New Issue
Block a user