Commit 159c19d9 authored by Sébastien Luttringer's avatar Sébastien Luttringer
Browse files

Remove failed payloads when errors occur during build

parent aa4e15df
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -313,6 +313,11 @@ class SourceImage(Image):
                    unlink(paydesc["link_path"])
                symlink(paydesc["dest_path"], paydesc["link_path"])
            except Exception as e:
                # cleaning file in case of error
                if exists(paydesc["dest_path"]):
                    unlink(paydesc["dest_path"])
                if lexists(paydesc["link_path"]):
                    unlink(paydesc["link_path"])
                raise ISError(u"Unable to create payload %s" % payload_name, e)

    def create_payload_tarball(self, tar_path, data_path, compressor):