Added a bit more error checking in the case of bad arguments.

This commit is contained in:
Jeremy Fincher 2003-09-29 16:13:51 +00:00
parent 31d418926d
commit df1a26900d

View File

@ -113,6 +113,8 @@ class Dict(callbacks.Privmsg):
a dictionary is specified and the definition is too long, snips it to a dictionary is specified and the definition is too long, snips it to
an appropriate length. an appropriate length.
""" """
if not args:
raise callbacks.ArgumentError
if args[0] in self.dictdbs: if args[0] in self.dictdbs:
dictionary = args.pop(0) dictionary = args.pop(0)
else: else: