Skip to content

Commit

Permalink
setup: Don’t fail cleanup on empty remote engine environment
Browse files Browse the repository at this point in the history
When engine-setup fails on dnf repositories download, the followup
cleanup fails with

[ ERROR ] Failed to execute stage 'Clean up': 'NoneType' object has no attribute 'cleanup'

This patch moves the corresponding cleanup call from STAGE_CLEANUP to
STAGE_CLOSEUP.  STAGE_CLOSEUP only runs if we didn't fail and runs
non-critical stuff that we can't, or don't want to, rollback.
  • Loading branch information
mz-pdm committed Jun 29, 2022
1 parent c9b4ead commit 1b94f27
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def _setup(self):
] = remote_engine.RemoteEngine(plugin=self)

@plugin.event(
stage=plugin.Stages.STAGE_CLEANUP,
stage=plugin.Stages.STAGE_CLOSEUP,
)
def _cleanup(self):
self.environment[
Expand Down

0 comments on commit 1b94f27

Please sign in to comment.