From: Kefu Chai Date: Sun, 2 May 2021 11:57:27 +0000 (+0800) Subject: doc/_ext: ignore desc if it is unavailable X-Git-Tag: v17.1.0~2092^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F41120%2Fhead;p=ceph.git 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 --- diff --git a/doc/_ext/ceph_confval.py b/doc/_ext/ceph_confval.py index 4d48664c9271..e7b669b88f6b 100644 --- a/doc/_ext/ceph_confval.py +++ b/doc/_ext/ceph_confval.py @@ -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}}``