mirror of
https://github.com/ceph/ceph
synced 2025-03-30 07:19:14 +00:00
doc/_ext: ignore desc if it is unavailable
there is chance that we don't have desc, desc_long or fmt_desc, in that case, we should just skip desc before checking its length. so, just use 'if desc' which is able to check for None or empty string. Signed-off-by: Kefu Chai <kchai@redhat.com>
This commit is contained in:
parent
ab7cb630ae
commit
659d01dcb5
@ -19,7 +19,7 @@ logger = logging.getLogger(__name__)
|
||||
|
||||
TEMPLATE = '''
|
||||
.. confval_option:: {{ opt.name }}
|
||||
{% if desc | length > 1 %}
|
||||
{% if desc %}
|
||||
{{ desc | wordwrap(70) | indent(3) }}
|
||||
{% endif %}
|
||||
:type: ``{{opt.type}}``
|
||||
|
Loading…
Reference in New Issue
Block a user