cli: check # of args in handle_set_build_volume()

This commit is contained in:
Mike McLean 2017-01-13 12:38:06 -05:00
parent ad31b3108b
commit b9400055ea

View file

@ -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])