Fix py3 docs build (#33345)

* Open file in binary mode to support py3 writes using bytes

* Update sort filter to use an attribute, so that py3 can sort dictionaries
This commit is contained in:
Matt Martz 2017-11-28 12:05:19 -06:00 committed by GitHub
commit 84b8f674a7
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 4 additions and 4 deletions

View file

@ -65,11 +65,11 @@ you can use the command line utility mentioned above (`ansible-config`) to brows
{% if config['version_added'] %}
:Version Added: {{config['version_added']}}
{% endif %}
{% for ini_map in config['ini']|sort %}
{% for ini_map in config['ini']|sort(attribute='section') %}
:Ini Section: {{ini_map['section']}}
:Ini Key: {{ini_map['key']}}
{% endfor %}
{% for env_var_map in config['env']|sort %}
{% for env_var_map in config['env']|sort(attribute='name') %}
:Environment: :envvar:`{{env_var_map['name']}}`
{% endfor %}
{% if config['deprecated'] %}