summaryrefslogtreecommitdiff
path: root/astroid/manager.py
diff options
context:
space:
mode:
authorAshley Whetter <ashley@awhetter.co.uk>2020-01-11 14:17:43 -0800
committerAshley Whetter <ashley@awhetter.co.uk>2020-01-11 14:17:43 -0800
commit616c7cec3cb06161dba83710db7083c6bc62e116 (patch)
treed327ec5ff04d0e6543d4b24aa262f2b876792e66 /astroid/manager.py
parent631539e8ca8cbdb73b1c8655214de10bdd51e466 (diff)
downloadastroid-git-616c7cec3cb06161dba83710db7083c6bc62e116.tar.gz
Return a stub module instead of an import error for frozen modules
Diffstat (limited to 'astroid/manager.py')
-rw-r--r--astroid/manager.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/astroid/manager.py b/astroid/manager.py
index 4dad678a..5e25e6e2 100644
--- a/astroid/manager.py
+++ b/astroid/manager.py
@@ -168,6 +168,8 @@ class AstroidManager:
return self._build_namespace_module(
modname, found_spec.submodule_search_locations
)
+ elif found_spec.type == spec.ModuleType.PY_FROZEN:
+ return self._build_stub_module(modname)
if found_spec.location is None:
raise exceptions.AstroidImportError(