]> code.ossystems Code Review - openembedded-core.git/commitdiff
scripts/yocto-compat-layer.py: Add dependency validation in add_layer
authorAníbal Limón <anibal.limon@linux.intel.com>
Mon, 27 Mar 2017 17:05:30 +0000 (11:05 -0600)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Tue, 28 Mar 2017 15:18:31 +0000 (16:18 +0100)
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>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/compatlayer/__init__.py

index 435679edbfb508d9feb8e5f2b6e09d9eaf626e82..58f94b778b1bf177c918820dcfbf1c70dc6a5e81 100644 (file)
@@ -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