зеркало из https://github.com/mozilla/gecko-dev.git
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:
Родитель
03a33dc5da
Коммит
02163ee09b
|
@ -148,6 +148,9 @@ class CommandAction(argparse.Action):
|
|||
cats = [(k, v[2]) for k, v in r.categories.items()]
|
||||
sorted_cats = sorted(cats, key=itemgetter(1), reverse=True)
|
||||
for category, priority in sorted_cats:
|
||||
if not r.commands_by_category[category]:
|
||||
continue
|
||||
|
||||
title, description, _priority = r.categories[category]
|
||||
|
||||
group = parser.add_argument_group(title, description)
|
||||
|
|
Загрузка…
Ссылка в новой задаче