[yocto] [layerindex-web][PATCH 3/3] import_layers: fix output when importing layers from scratch

Paul Eggleton paul.eggleton at linux.intel.com
Sun Sep 15 22:19:39 PDT 2019


Fixes "Importing None" message since we had not yet initialised the
layerbranch variable.

Signed-off-by: Paul Eggleton <paul.eggleton at linux.intel.com>
---
 layerindex/tools/import_layers.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/layerindex/tools/import_layers.py b/layerindex/tools/import_layers.py
index 0ce31968..1e49bbdf 100755
--- a/layerindex/tools/import_layers.py
+++ b/layerindex/tools/import_layers.py
@@ -329,10 +329,10 @@ def main():
                         continue
                     logger.info('Updating %s (%d/%d)' % (layerbranch, i+1, layercount))
                 else:
-                    logger.info('Importing %s (%d/%d)' % (layerbranch, i+1, layercount))
                     layerbranch = LayerBranch()
                     layerbranch.branch = branch
                     layerbranch.layer = layer
+                    logger.info('Importing %s (%d/%d)' % (layerbranch, i+1, layercount))
 
 
                 for key, value in layerbranchjs.items():
-- 
2.20.1



More information about the yocto mailing list