From 15c8429a73ed69bdbdf6e96fe9775c38c9402b8e Mon Sep 17 00:00:00 2001 From: Chenxiong Qi Date: Sep 14 2017 09:03:55 +0000 Subject: Log error when no parent image is found Fix #82 Signed-off-by: Chenxiong Qi --- diff --git a/freshmaker/lightblue.py b/freshmaker/lightblue.py index 314c2bb..3f48bb7 100644 --- a/freshmaker/lightblue.py +++ b/freshmaker/lightblue.py @@ -552,6 +552,14 @@ class LightBlue(object): # built. parent = self.get_image_by_layer(parent_top_layer, parent_build_layers_count) + + children_image_layers_count = parent_build_layers_count + 1 + if parent is None and children_image_layers_count > 2: + log.error( + 'No parent image is found from LightBlue, whose ' + 'top layer is %s and which has %d layers', + parent_top_layer, parent_build_layers_count) + if parent: parent.resolve_commit(srpm_name) images[-1]['parent'] = parent