]> code.ossystems Code Review - openembedded-core.git/commitdiff
checklayer: Skip layers without a collection
authorJoshua Watt <JPEWhacker@gmail.com>
Fri, 22 May 2020 22:08:26 +0000 (17:08 -0500)
committerRichard Purdie <richard.purdie@linuxfoundation.org>
Sun, 24 May 2020 22:55:31 +0000 (23:55 +0100)
As in other places in the file, skip layers that don't define a
collection when searching for a layer to resolve a dependency. Fixes
KeyError exceptions when attempting to access the layer collections
later

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
scripts/lib/checklayer/__init__.py

index 5aeec2f00f75eae78e7140679e22b70bd73d3eb5..1138000275192ed95fe9325412faa35518e104e6 100644 (file)
@@ -143,6 +143,9 @@ def detect_layers(layer_directories, no_auto):
 
 def _find_layer_depends(depend, layers):
     for layer in layers:
+        if 'collections' not in layer:
+            continue
+
         for collection in layer['collections']:
             if depend == collection:
                 return layer