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

View File

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