From cf046fcaebccc4504d3efdc317bde88c2d340bce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20Budai?= Date: Tue, 3 Sep 2019 16:34:17 +0200 Subject: [PATCH] osbuild: fix stages caching We have never tried to reuse the first stage due to fact that range in for loop didn't include zero index. This commit fixes it. --- osbuild/pipeline.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osbuild/pipeline.py b/osbuild/pipeline.py index 0b3a3921..13057bab 100644 --- a/osbuild/pipeline.py +++ b/osbuild/pipeline.py @@ -200,7 +200,7 @@ class Pipeline: # that as the base. base = None base_idx = -1 - for i in range(len(self.stages) - 1, 0, -1): + for i in reversed(range(len(self.stages))): if object_store.has_tree(self.stages[i].id): base = self.stages[i].id base_idx = i