From: "Aníbal Limón" <anibal.limon@linux.intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] scripts/yocto-compat-layer.py: Add dependency validation in add_layer
Date: Mon, 27 Mar 2017 11:05:30 -0600 [thread overview]
Message-ID: <1490634330-5652-1-git-send-email-anibal.limon@linux.intel.com> (raw)
Some layers don't have dependencies so add a validation to avoid
exception when trying to None.split().
Signed-off-by: Aníbal Limón <anibal.limon@linux.intel.com>
---
scripts/lib/compatlayer/__init__.py | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/scripts/lib/compatlayer/__init__.py b/scripts/lib/compatlayer/__init__.py
index 435679e..58f94b7 100644
--- a/scripts/lib/compatlayer/__init__.py
+++ b/scripts/lib/compatlayer/__init__.py
@@ -143,7 +143,11 @@ def add_layer(bblayersconf, layer, layers, logger):
logger.info('Adding layer %s' % layer['name'])
for collection in layer['collections']:
- for depend in layer['collections'][collection]['depends'].split():
+ depends = layer['collections'][collection]['depends']
+ if not depends:
+ continue
+
+ for depend in depends.split():
# core (oe-core) is suppose to be provided
if depend == 'core':
continue
--
2.1.4
reply other threads:[~2017-03-27 17:01 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1490634330-5652-1-git-send-email-anibal.limon@linux.intel.com \
--to=anibal.limon@linux.intel.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox