mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-07 19:49:23 +01:00
Fixed a bug with debfile so that it doesn't error out when there are no
arguments
This commit is contained in:
parent
1a51ced500
commit
f567f36e4c
@ -126,6 +126,8 @@ class Debian(callbacks.Privmsg, plugins.PeriodicFileDownloader):
|
|||||||
# (the filenames don't have leading slashes, and people may not know
|
# (the filenames don't have leading slashes, and people may not know
|
||||||
# that).
|
# that).
|
||||||
(optlist, rest) = getopt.getopt(args, '', ['regexp=', 'exact='])
|
(optlist, rest) = getopt.getopt(args, '', ['regexp=', 'exact='])
|
||||||
|
if not optlist and not rest:
|
||||||
|
raise callbacks.ArgumentError
|
||||||
if len(optlist) + len(rest) > 1:
|
if len(optlist) + len(rest) > 1:
|
||||||
irc.error(msg, 'Only one search option is allowed.')
|
irc.error(msg, 'Only one search option is allowed.')
|
||||||
return
|
return
|
||||||
|
Loading…
Reference in New Issue
Block a user