From fd2529255d1dfabb1ad5f2e0491de7951911fa67 Mon Sep 17 00:00:00 2001 From: Anurag Dwivedi Date: Tue, 31 Oct 2017 02:46:17 -0400 Subject: [PATCH] Bug 407 : Deleting Package on Descriptor Validation Failure Signed-off-by: Anurag Dwivedi --- .../rwlaunchpadtasklet/rift/tasklets/rwlaunchpad/uploader.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/rwlaunchpad/plugins/rwlaunchpadtasklet/rift/tasklets/rwlaunchpad/uploader.py b/rwlaunchpad/plugins/rwlaunchpadtasklet/rift/tasklets/rwlaunchpad/uploader.py index 38e2ae9f..800c7ef9 100644 --- a/rwlaunchpad/plugins/rwlaunchpadtasklet/rift/tasklets/rwlaunchpad/uploader.py +++ b/rwlaunchpad/plugins/rwlaunchpadtasklet/rift/tasklets/rwlaunchpad/uploader.py @@ -461,6 +461,7 @@ class OnboardPackage(downloader.DownloaderProtocol): self.validate_descriptor_fields(temp_package) except Exception as e: self.log.exception("Descriptor validation Failed") + self.delete_stored_package(stored_package) raise try: self.extract_icons(temp_package) @@ -489,6 +490,7 @@ class OnboardPackage(downloader.DownloaderProtocol): if str(e): self.log.message(OnboardError(str(e))) self.log.message(OnboardFailure()) + raise OnboardException(OnboardFailure()) def on_download_succeeded(self, job): self.log.message(DownloadSuccess("Package downloaded.")) -- 2.25.1