Merge pull request #8206 from dvrkps/patch-1

Remove explicit err var declaration
This commit is contained in:
Adrien Delorme 2019-10-09 16:26:01 +02:00 committed by GitHub
commit bdc4213a1e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 3 deletions

View File

@ -84,8 +84,6 @@ func (s *StepCreateExternalSwitch) Cleanup(state multistep.StateBag) {
ui.Say("Unregistering and deleting external switch...")
var err error = nil
errMsg := "Error deleting external switch: %s"
// connect the vm to the old switch
@ -94,7 +92,7 @@ func (s *StepCreateExternalSwitch) Cleanup(state multistep.StateBag) {
return
}
err = driver.ConnectVirtualMachineNetworkAdapterToSwitch(vmName, s.oldSwitchName)
err := driver.ConnectVirtualMachineNetworkAdapterToSwitch(vmName, s.oldSwitchName)
if err != nil {
ui.Error(fmt.Sprintf(errMsg, err))
return