Commit 23a3b22e authored by Seblu's avatar Seblu

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
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment