From 4b7fb6c453d4b9510495c60fe29b8632d9bb869b Mon Sep 17 00:00:00 2001 From: Kefu Chai Date: Wed, 21 Apr 2021 13:32:35 +0800 Subject: [PATCH] doc/conf.py: use glob.glob() to find .yaml.in files improve the maintainability of .yaml.in files. Signed-off-by: Kefu Chai --- doc/conf.py | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/doc/conf.py b/doc/conf.py index 9b4da176c08..93df49cd70d 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): -- 2.39.5