Bug 902002 - Don't display mach categories in help if no commands exist under them, r=gps, DONTBUILD, a=NPOTB
This commit is contained in:
@@ -148,6 +148,9 @@ class CommandAction(argparse.Action):
|
|||||||
cats = [(k, v[2]) for k, v in r.categories.items()]
|
cats = [(k, v[2]) for k, v in r.categories.items()]
|
||||||
sorted_cats = sorted(cats, key=itemgetter(1), reverse=True)
|
sorted_cats = sorted(cats, key=itemgetter(1), reverse=True)
|
||||||
for category, priority in sorted_cats:
|
for category, priority in sorted_cats:
|
||||||
|
if not r.commands_by_category[category]:
|
||||||
|
continue
|
||||||
|
|
||||||
title, description, _priority = r.categories[category]
|
title, description, _priority = r.categories[category]
|
||||||
|
|
||||||
group = parser.add_argument_group(title, description)
|
group = parser.add_argument_group(title, description)
|
||||||
|
|||||||
Reference in New Issue
Block a user