Commit 159c19d9 authored by Seblu's avatar Seblu

Remove failed payloads when errors occur during build

parent aa4e15df
......@@ -313,6 +313,11 @@ class SourceImage(Image):
symlink(paydesc["dest_path"], paydesc["link_path"])
except Exception as e:
# cleaning file in case of error
if exists(paydesc["dest_path"]):
if lexists(paydesc["link_path"]):
raise ISError(u"Unable to create payload %s" % payload_name, e)
def create_payload_tarball(self, tar_path, data_path, compressor):
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