Fix #7364: autosummary: crashed when autosummary_generate is False

This commit is contained in:
Takeshi KOMIYA
2020-03-23 01:46:29 +09:00
parent d2f7628f8d
commit aacde5032d
2 changed files with 4 additions and 0 deletions

View File

@@ -16,6 +16,8 @@ Features added
Bugs fixed
----------
* #7364: autosummary: crashed when :confval:`autosummary_generate` is False
Testing
--------

View File

@@ -722,6 +722,8 @@ def process_generate_options(app: Sphinx) -> None:
env = app.builder.env
genfiles = [env.doc2path(x, base=None) for x in env.found_docs
if os.path.isfile(env.doc2path(x))]
elif genfiles is False:
pass
else:
ext = list(app.config.source_suffix)
genfiles = [genfile + (ext[0] if not genfile.endswith(tuple(ext)) else '')