Skip to content

Commit

Permalink
Fixes from review
Browse files Browse the repository at this point in the history
  • Loading branch information
tomuben committed Jan 28, 2025
1 parent ae7b67c commit 8150791
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,3 @@ class ExportContainerParameter(ExportContainerParameterBase):

class ExportContainersParameter(ExportContainerParameterBase):
release_goals: Tuple[str, ...] = luigi.ListParameter(["release"]) # type: ignore
# TOOD force export
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,18 @@ def run_task(self) -> Generator[BaseTask, None, None]:
yield from self._cleanup_docker_image_if_needed()
self.return_object(is_new)

def cleanup_task(self, success):
def _cleanup_tmp_directory(self):
if self._tmp_directory is not None:
shutil.rmtree(self._tmp_directory)

def on_failure(self, exception):
super().on_failure(exception)
self._cleanup_tmp_directory()

def on_success(self):
super().on_success()
self._cleanup_tmp_directory()

def _export_release(
self, release_image_name: str, release_file: Path, checksum_file: Path
) -> Generator[BaseTask, None, None]:
Expand Down

0 comments on commit 8150791

Please sign in to comment.