We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e5b4851 commit 9c6543aCopy full SHA for 9c6543a
doc/tools/apigen.py
@@ -207,7 +207,11 @@ def _parse_module_with_import(self, uri):
207
classes : list of str
208
A list of (public) class names in the module.
209
"""
210
- mod = __import__(uri, fromlist=[uri])
+ try:
211
+ mod = __import__(uri, fromlist=[uri])
212
+ except ImportError:
213
+ # fix ImportError for submodules in Python 3
214
+ mod = __import__(uri, fromlist=[])
215
# find all public objects in the module.
216
obj_strs = [obj for obj in dir(mod) if not obj.startswith('_')]
217
functions = []
0 commit comments