Skip to content

Commit

Permalink
Merge pull request sphinx-doc#7365 from tk0miya/7364_autosummary_crashed
Browse files Browse the repository at this point in the history
Fix sphinx-doc#7364: autosummary: crashed when autosummary_generate is False
  • Loading branch information
tk0miya committed Mar 24, 2020
2 parents d53e903 + dbf1982 commit 955d02c
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGES
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ Features added
Bugs fixed
----------

* #7364: autosummary: crashed when :confval:`autosummary_generate` is False
* #7370: autosummary: raises UnboundLocalError when unknown module given

Testing
Expand Down
2 changes: 2 additions & 0 deletions sphinx/ext/autosummary/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 '')
Expand Down

0 comments on commit 955d02c

Please sign in to comment.