Fix #4878: Crashed with extension which returns invalid metadata

This commit is contained in:
Takeshi KOMIYA 2018-04-22 19:25:02 +09:00
parent a2542cad0f
commit a31c0ddfca
2 changed files with 2 additions and 0 deletions

View File

@ -32,6 +32,7 @@ Bugs fixed
* toctree directive tries to glob for URL having query_string * toctree directive tries to glob for URL having query_string
* #4871: html search: Upper characters problem in German * #4871: html search: Upper characters problem in German
* #4717: latex: Compilation for German docs failed with LuaLaTeX and XeLaTeX * #4717: latex: Compilation for German docs failed with LuaLaTeX and XeLaTeX
* #4878: Crashed with extension which returns invalid metadata
Testing Testing
-------- --------

View File

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