summaryrefslogtreecommitdiff
path: root/poky/meta/recipes-devtools/python/python3/get_module_deps3.py
diff options
context:
space:
mode:
Diffstat (limited to 'poky/meta/recipes-devtools/python/python3/get_module_deps3.py')
-rw-r--r--poky/meta/recipes-devtools/python/python3/get_module_deps3.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/poky/meta/recipes-devtools/python/python3/get_module_deps3.py b/poky/meta/recipes-devtools/python/python3/get_module_deps3.py
index 1f4c982aed..0ca687d2eb 100644
--- a/poky/meta/recipes-devtools/python/python3/get_module_deps3.py
+++ b/poky/meta/recipes-devtools/python/python3/get_module_deps3.py
@@ -56,7 +56,7 @@ if debug == True:
try:
m = importlib.import_module(current_module)
# handle python packages which may not include all modules in the __init__
- if os.path.basename(m.__file__) == "__init__.py":
+ if hasattr(m, '__file__') and os.path.basename(m.__file__) == "__init__.py":
modulepath = os.path.dirname(m.__file__)
for i in os.listdir(modulepath):
if i.startswith("_") or not(i.endswith(".py")):