cli: check # of args in handle_set_build_volume()
This commit is contained in:
parent
ad31b3108b
commit
b9400055ea
1 changed files with 2 additions and 0 deletions
2
cli/koji
2
cli/koji
|
|
@ -2290,6 +2290,8 @@ def handle_set_build_volume(options, session, args):
|
|||
parser = OptionParser(usage=usage)
|
||||
parser.add_option("-v", "--verbose", action="store_true", help=_("Be verbose"))
|
||||
(options, args) = parser.parse_args(args)
|
||||
if len(args) < 2:
|
||||
parser.error("You must provide a volume and at least one build")
|
||||
volinfo = session.getVolume(args[0])
|
||||
if not volinfo:
|
||||
print("No such volume: %s" % args[0])
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue