From 79d046f71e8c3d2cae2acd2411edfa615e7a7cef Mon Sep 17 00:00:00 2001 From: Giulia Naponiello Date: Feb 10 2020 10:57:06 +0000 Subject: No need to use layers to find parent image find_parent_images_with_package was still called using layers as list of images. But `layers` is a list of string, which is not what we expect. For this reason an error is raised: 'str' object does not support item assignment. Signed-off-by: Giulia Naponiello --- diff --git a/freshmaker/lightblue.py b/freshmaker/lightblue.py index b51a91b..362460f 100644 --- a/freshmaker/lightblue.py +++ b/freshmaker/lightblue.py @@ -1649,21 +1649,10 @@ class LightBlue(object): rebuild_list[srpm_name] = [image] continue - layers = unpublished["parsed_data"]["layers"] rebuild_list[srpm_name] = self.find_parent_images_with_package( - image, srpm_name, layers) + image, srpm_name, []) if rebuild_list[srpm_name]: image['parent'] = rebuild_list[srpm_name][0] - else: - parent = self.find_latest_parent_image(layers[1], len(layers) - 1) - if parent: - parent.resolve(self, [image]) - elif len(layers) != 2: - image.log_error( - "Cannot find parent image with layer %s and layer " - "count %d in Lightblue, Lightblue data is probably " - "incomplete" % (layers[1], len(layers) - 1)) - image['parent'] = parent rebuild_list[srpm_name].insert(0, image) return rebuild_list