summaryrefslogtreecommitdiffstats
path: root/bitbake/lib/bb/parse/ast.py
diff options
context:
space:
mode:
Diffstat (limited to 'bitbake/lib/bb/parse/ast.py')
-rw-r--r--bitbake/lib/bb/parse/ast.py12
1 files changed, 12 insertions, 0 deletions
diff --git a/bitbake/lib/bb/parse/ast.py b/bitbake/lib/bb/parse/ast.py
index 862087c77d..375ba3cb79 100644
--- a/bitbake/lib/bb/parse/ast.py
+++ b/bitbake/lib/bb/parse/ast.py
@@ -290,6 +290,18 @@ class PyLibNode(AstNode):
290 toimport = getattr(bb.utils._context[self.namespace], "BBIMPORTS", []) 290 toimport = getattr(bb.utils._context[self.namespace], "BBIMPORTS", [])
291 for i in toimport: 291 for i in toimport:
292 bb.utils._context[self.namespace] = __import__(self.namespace + "." + i) 292 bb.utils._context[self.namespace] = __import__(self.namespace + "." + i)
293 mod = getattr(bb.utils._context[self.namespace], i)
294 fn = getattr(mod, "__file__")
295 funcs = {}
296 for f in dir(mod):
297 if f.startswith("_"):
298 continue
299 fcall = getattr(mod, f)
300 if not callable(fcall):
301 continue
302 funcs[f] = fcall
303 bb.codeparser.add_module_functions(fn, funcs, "%s.%s" % (self.namespace, i))
304
293 except AttributeError as e: 305 except AttributeError as e:
294 bb.error("Error importing OE modules: %s" % str(e)) 306 bb.error("Error importing OE modules: %s" % str(e))
295 307