summaryrefslogtreecommitdiff
path: root/sphinx/ext/autosummary/generate.py
diff options
context:
space:
mode:
authorTakeshi KOMIYA <i.tkomiya@gmail.com>2022-06-03 02:29:39 +0900
committerTakeshi KOMIYA <i.tkomiya@gmail.com>2022-06-03 02:29:39 +0900
commitce345a2f28f46e75e493ce5c35e7f991437f817d (patch)
tree8c2f1abaad91ac6d092448793a58a45aaad8e148 /sphinx/ext/autosummary/generate.py
parentab58bbaed71293bf8f5738f386b853b17b4190eb (diff)
downloadsphinx-git-ce345a2f28f46e75e493ce5c35e7f991437f817d.tar.gz
Fix #10509: autosummary: autosummary fails with a shared library
Diffstat (limited to 'sphinx/ext/autosummary/generate.py')
-rw-r--r--sphinx/ext/autosummary/generate.py8
1 files changed, 6 insertions, 2 deletions
diff --git a/sphinx/ext/autosummary/generate.py b/sphinx/ext/autosummary/generate.py
index 5ef7b0352..3db7eb989 100644
--- a/sphinx/ext/autosummary/generate.py
+++ b/sphinx/ext/autosummary/generate.py
@@ -155,8 +155,12 @@ class ModuleScanner:
def scan(self, imported_members: bool) -> List[str]:
members = []
- analyzer = ModuleAnalyzer.for_module(self.object.__name__)
- attr_docs = analyzer.find_attr_docs()
+ try:
+ analyzer = ModuleAnalyzer.for_module(self.object.__name__)
+ attr_docs = analyzer.find_attr_docs()
+ except PycodeError:
+ attr_docs = {}
+
for name in members_of(self.object, self.app.config):
try:
value = safe_getattr(self.object, name)