From: Kefu Chai Date: Wed, 21 Apr 2021 05:32:35 +0000 (+0800) Subject: doc/conf.py: use glob.glob() to find .yaml.in files X-Git-Tag: v17.1.0~2191^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=4b7fb6c453d4b9510495c60fe29b8632d9bb869b;p=ceph.git doc/conf.py: use glob.glob() to find .yaml.in files improve the maintainability of .yaml.in files. Signed-off-by: Kefu Chai --- diff --git a/doc/conf.py b/doc/conf.py index 9b4da176c08c..93df49cd70d2 100644 --- a/doc/conf.py +++ b/doc/conf.py @@ -1,4 +1,5 @@ import fileinput +import glob import logging import os import shutil @@ -227,18 +228,9 @@ openapi_logger = sphinx.util.logging.getLogger('sphinxcontrib.openapi.openapi30' openapi_logger.setLevel(logging.WARNING) # ceph_confval -ceph_confval_imports = [os.path.join(top_level, - 'src/common/options', - yaml + '.yaml.in') - for yaml in ['global', - 'crimson', - 'immutable-object-cache', - 'mds', - 'mds-client', - 'rbd', - 'rbd-mirror', - 'rgw']] - +ceph_confval_imports = glob.glob(os.path.join(top_level, + 'src/common/options', + '*.yaml.in')) # handles edit-on-github and old version warning display def setup(app):