Merge pull request #4883 from tk0miya/4878_ignore_invalid_extension_metadata

Fix #4878: Crashed with extension which returns invalid metadata
This commit is contained in:
Takeshi KOMIYA 2018-04-23 01:18:41 +09:00 committed by GitHub
commit a0cb99ee71
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 0 deletions

View File

@ -33,6 +33,7 @@ Bugs fixed
* #4871: html search: Upper characters problem in German
* #4717: latex: Compilation for German docs failed with LuaLaTeX and XeLaTeX
* #4459: duplicated labels detector does not work well in parallel build
* #4878: Crashed with extension which returns invalid metadata
Testing
--------

View File

@ -340,6 +340,7 @@ class SphinxComponentRegistry(object):
logger.warning(__('extension %r returned an unsupported object from '
'its setup() function; it should return None or a '
'metadata dictionary'), extname)
metadata = {}
app.extensions[extname] = Extension(extname, mod, **metadata)
app._setting_up_extension.pop()