Fixed a bug with debfile so that it doesn't error out when there are no

arguments
This commit is contained in:
James Vega 2003-10-16 01:59:17 +00:00
parent 1a51ced500
commit f567f36e4c

View File

@ -126,6 +126,8 @@ class Debian(callbacks.Privmsg, plugins.PeriodicFileDownloader):
# (the filenames don't have leading slashes, and people may not know
# that).
(optlist, rest) = getopt.getopt(args, '', ['regexp=', 'exact='])
if not optlist and not rest:
raise callbacks.ArgumentError
if len(optlist) + len(rest) > 1:
irc.error(msg, 'Only one search option is allowed.')
return