From b1eced82595ebe9ede96d611ff165af29ef72f2b Mon Sep 17 00:00:00 2001 From: Florian Festi Date: Sat, 27 Oct 2018 13:05:02 +0200 Subject: [PATCH] Ignore argument groups in the web UI that are empty except --help --- scripts/boxesserver | 2 ++ 1 file changed, 2 insertions(+) diff --git a/scripts/boxesserver b/scripts/boxesserver index 94ce0ce..fcef1f6 100755 --- a/scripts/boxesserver +++ b/scripts/boxesserver @@ -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('''

%s

\n\n''' % (groupid, groupid, group.title, groupid)) for a in group._group_actions: