From: Anurag Dwivedi Date: Tue, 31 Oct 2017 06:46:17 +0000 (-0400) Subject: Bug 407 : Deleting Package on Descriptor Validation Failure X-Git-Tag: v3.0.0rc14~1 X-Git-Url: https://osm.etsi.org/gitweb/?a=commitdiff_plain;h=fd2529255d1dfabb1ad5f2e0491de7951911fa67;p=osm%2FSO.git Bug 407 : Deleting Package on Descriptor Validation Failure Signed-off-by: Anurag Dwivedi --- 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."))