From 349099a4c61aa1b8d37a13bb51d1684656f2ae73 Mon Sep 17 00:00:00 2001 From: Matt Martz Date: Thu, 7 Dec 2017 09:16:04 -0500 Subject: [PATCH] Fix sorting in man template on python3. Fixes #33663 (#33673) --- docs/templates/man.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/templates/man.j2 b/docs/templates/man.j2 index bad88633972..c9a06994e8f 100644 --- a/docs/templates/man.j2 +++ b/docs/templates/man.j2 @@ -51,7 +51,7 @@ ACTIONS *{{ action }}*::: {{ (actions[action]['desc']|default(' '))|wordwrap}} {% if actions[action]['options'] %} -{% for option in actions[action]['options']|sort %} +{% for option in actions[action]['options']|sort(attribute='options') %} {% for switch in option['options'] if switch in actions[action]['option_names'] %}*{{switch}}*{% if option['arg'] %} '{{option['arg']}}'{% endif %}{% if not loop.last %}, {% endif %}{% endfor %}:: {{ (option['desc']) }}