From 23a3b22e551d8df29089a11eae458fbf754f1b7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Luttringer?= Date: Thu, 27 Jun 2013 15:11:10 +0200 Subject: [PATCH] Remove .isimage before processing with build -f This let place clean when error occurs in building a payload when a previous successful build have been done. --- installsystems/image/source.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/installsystems/image/source.py b/installsystems/image/source.py index 579dc18..e952dac 100644 --- a/installsystems/image/source.py +++ b/installsystems/image/source.py @@ -175,8 +175,11 @@ class SourceImage(Image): Create packaged image ''' # check if free to create script tarball - if exists(self.image_name) and force == False: - raise ISError("Tarball already exists. Remove it before") + if exists(self.image_name): + if force: + unlink(self.image_name) + else: + raise ISError("Tarball already exists. Remove it before") # register start time t0 = time() # check python scripts -- GitLab