remove check for AMIs when deleting vols

This removes the unnecessary check for AMIs before cleaning up volumes.
AMIs will exist on a successful run, but not when a build fails after
instance creation (during provisioning for example).  The following
check for instance being nil should be sufficient.
This commit is contained in:
Jeremy Asher 2016-08-08 14:16:43 -07:00
parent 50330b8e69
commit 6130b8588d
1 changed files with 0 additions and 6 deletions

View File

@ -30,12 +30,6 @@ func (s *stepCleanupVolumes) Cleanup(state multistep.StateBag) {
instance = instanceRaw.(*ec2.Instance)
}
ui := state.Get("ui").(packer.Ui)
amisRaw := state.Get("amis")
if amisRaw == nil {
ui.Say("No AMIs to cleanup")
return
}
if instance == nil {
ui.Say("No volumes to clean up, skipping")
return