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

Submitted by Paul Eggleton on Sept. 16, 2019, 5:19 a.m. | Patch ID: 165009

Details

Message ID b46de0bfa76781b2903b8844611986df18726a2f.1568611075.git.paul.eggleton@linux.intel.com
State New
Headers show

Commit Message

Paul Eggleton Sept. 16, 2019, 5:19 a.m.
Fixes "Importing None" message since we had not yet initialised the
layerbranch variable.

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

Patch hide | download patch | download mbox

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():