Ignore argument groups in the web UI that are empty except --help
This commit is contained in:
parent
b9f652ee71
commit
b1eced8259
|
@ -182,6 +182,8 @@ class BServer:
|
|||
for group in box.argparser._action_groups[3:] + box.argparser._action_groups[:3]:
|
||||
if not group._group_actions:
|
||||
continue
|
||||
if len(group._group_actions) == 1 and isinstance(group._group_actions[0], argparse._HelpAction):
|
||||
continue
|
||||
prefix = getattr(group, "prefix", None)
|
||||
result.append('''<h3 id="h-%s" class="open" onclick="showHide(%s)">%s</h3>\n<table id="%s">\n''' % (groupid, groupid, group.title, groupid))
|
||||
for a in group._group_actions:
|
||||
|
|
Loading…
Reference in New Issue