Skip to content
Snippets Groups Projects
Commit 23a3b22e authored by Sébastien Luttringer's avatar Sébastien Luttringer
Browse files

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.
parent 159c19d9
Branches master
No related tags found
No related merge requests found
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment