mirror of
https://github.com/sphinx-doc/sphinx.git
synced 2025-02-25 18:55:22 -06:00
Fix #7370: autosummary: raises UnboundLocalError when unknown module given
This commit is contained in:
parent
d2f7628f8d
commit
263b7a021c
2
CHANGES
2
CHANGES
@ -16,6 +16,8 @@ Features added
|
||||
Bugs fixed
|
||||
----------
|
||||
|
||||
* #7370: autosummary: raises UnboundLocalError when unknown module given
|
||||
|
||||
Testing
|
||||
--------
|
||||
|
||||
|
@ -279,7 +279,7 @@ def generate_autosummary_docs(sources: List[str], output_dir: str = None,
|
||||
try:
|
||||
name, obj, parent, mod_name = import_by_name(entry.name)
|
||||
except ImportError as e:
|
||||
_warn(__('[autosummary] failed to import %r: %s') % (name, e))
|
||||
_warn(__('[autosummary] failed to import %r: %s') % (entry.name, e))
|
||||
continue
|
||||
|
||||
content = generate_autosummary_content(name, obj, parent, template, entry.template,
|
||||
|
Loading…
Reference in New Issue
Block a user