Lucky should error if given no args.

This commit is contained in:
Jeremy Fincher 2004-07-31 18:42:48 +00:00
parent 2a611309a7
commit 197238efa0
1 changed files with 2 additions and 0 deletions

View File

@ -216,6 +216,8 @@ class Google(callbacks.PrivmsgCommandAndRegexp):
Does a google search, but only returns the first result.
"""
if not args:
raise callbacks.ArgumentError
data = search(self.log, args)
if data.results:
url = data.results[0].URL