summaryrefslogtreecommitdiffstats
path: root/meta/classes/base.bbclass
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2019-10-02 14:59:18 +0100
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-10-02 20:22:25 +0100
commited05d969ea4a6bb8df3956a621d7d3e94e6cb515 (patch)
treeb886be2e0968e882191d1e37b381a3d089cea57e /meta/classes/base.bbclass
parenta98bc7dcdf864f2ea6d6a727e053049dbccfaf5e (diff)
downloadpoky-ed05d969ea4a6bb8df3956a621d7d3e94e6cb515.tar.gz
base: Improve module import error message
Turn: ERROR: Unable to parse Var <OE_IMPORTED[:=]> Traceback (most recent call last): File "Var <OE_IMPORTED[:=]>", line 1, in <module> File "/media/build1/poky/meta/classes/base.bbclass", line 35, in oe_import(d=<bb.data_smart.DataSmart object at 0x7f1d941ad208>): for toimport in oe.data.typed_value("OE_IMPORTS", d): > imported = __import__(toimport) inject(toimport.split(".", 1)[0], imported) File "/media/build1/poky/meta/lib/oe/sstatesig.py", line 267, in <module>: >class SignatureGeneratorOEEquivHash(SignatureGeneratorOEBasicHashMixIn, bb.siggen.SignatureGeneratorUniHashMixIn, bb.siggen.SignatureGeneratorBasicHash): name = "OEEquivHash" bb.data_smart.ExpansionError: Failure expanding variable OE_IMPORTED[:=], expression was ${@oe_import(d)} which triggered exception AttributeError: module 'bb.siggen' has no attribute 'SignatureGeneratorUniHashMixIn' into: ERROR: Error importing OE modules: module 'bb.siggen' has no attribute 'SignatureGeneratorUniHashMixIn' which can then trigger a version mismatch error message. (From OE-Core rev: 5b01726d1cf478aba8d1acc73e29f6cab0c9371e) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes/base.bbclass')
-rw-r--r--meta/classes/base.bbclass8
1 files changed, 5 insertions, 3 deletions
diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 0c8a4b2862..d3184ecf7b 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -32,9 +32,11 @@ def oe_import(d):
32 32
33 import oe.data 33 import oe.data
34 for toimport in oe.data.typed_value("OE_IMPORTS", d): 34 for toimport in oe.data.typed_value("OE_IMPORTS", d):
35 imported = __import__(toimport) 35 try:
36 inject(toimport.split(".", 1)[0], imported) 36 imported = __import__(toimport)
37 37 inject(toimport.split(".", 1)[0], imported)
38 except AttributeError as e:
39 bb.error("Error importing OE modules: %s" % str(e))
38 return "" 40 return ""
39 41
40# We need the oe module name space early (before INHERITs get added) 42# We need the oe module name space early (before INHERITs get added)