Fixed manifestutil traceback if no subcommands are given

In manifestutil if no subcommands are given manifestutil exits with a
trackback.  I added a check to see if the number of subcommands is < 1
and to list the available subcommands if so.
This commit is contained in:
eholtam
2016-01-07 10:44:35 -06:00
parent 8c7a10226f
commit 36514fc748

View File

@@ -882,6 +882,12 @@ def setUpTabCompleter():
def handleSubcommand(args):
'''Does all our subcommands'''
# check if any arguments are passed.
# if not, list subcommands.
if len(args) < 1:
help(args)
return 2
# strip leading hyphens and
# replace embedded hyphens with underscores
# so '--add-pkg' becomes 'add_pkg'