From patchwork Wed Jun 22 09:13:14 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: classes/native*.bbclass: fix error during parse with bitbake master Date: Wed, 22 Jun 2011 09:13:14 -0000 From: Paul Eggleton X-Patchwork-Id: 6237 Message-Id: <1308733994-3571-1-git-send-email-paul.eggleton@linux.intel.com> To: openembedded-devel@lists.openembedded.org Fixes "AttributeError: 'NoneType' object has no attribute 'split'" during parsing with bitbake master. We should not be calling explode_deps with None as the argument, so check for that before calling it. Signed-off-by: Paul Eggleton Acked-by: Koen Kooi --- classes/native.bbclass | 5 ++++- classes/nativesdk.bbclass | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/classes/native.bbclass b/classes/native.bbclass index 1e7a6ec..e9d48a3 100644 --- a/classes/native.bbclass +++ b/classes/native.bbclass @@ -116,7 +116,10 @@ python __anonymous () { if "native" in (bb.data.getVar('BBCLASSEXTEND', d, True) or ""): pn = bb.data.getVar("PN", d, True) depends = bb.data.getVar("DEPENDS_virtclass-native", d, True) - deps = bb.utils.explode_deps(depends) + if depends: + deps = bb.utils.explode_deps(depends) + else: + deps = [] newdeps = [] for dep in deps: if dep.endswith("-cross"): diff --git a/classes/nativesdk.bbclass b/classes/nativesdk.bbclass index 6689399..7a8f385 100644 --- a/classes/nativesdk.bbclass +++ b/classes/nativesdk.bbclass @@ -59,7 +59,10 @@ OVERRIDES =. "virtclass-nativesdk:" python __anonymous () { pn = bb.data.getVar("PN", d, True) depends = bb.data.getVar("DEPENDS_virtclass-nativesdk", d, True) - deps = bb.utils.explode_deps(depends) + if depends: + deps = bb.utils.explode_deps(depends) + else: + deps = [] newdeps = [] for dep in deps: if dep.endswith("-native") or dep.endswith("-cross"):