Skip to content
This repository has been archived by the owner on Dec 14, 2023. It is now read-only.

Commit

Permalink
Merge pull request #6 from gardener/dont-wrap-errors
Browse files Browse the repository at this point in the history
Don't wrap errors from unexported methods in core.go
  • Loading branch information
moadqassem authored Aug 13, 2020
2 parents 1141f87 + 851ff67 commit 1f3792a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pkg/kubevirt/core/core.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func (p PluginSPIImpl) DeleteMachine(ctx context.Context, machineName, providerI
klog.V(2).Infof("skip virtualMachine evicting, virtualMachine instance %s is not found", machineName)
return "", nil
}
return "", fmt.Errorf("failed to get virtualMachine: %v", err)
return "", err
}

if err := client.IgnoreNotFound(c.Delete(ctx, virtualMachine)); err != nil {
Expand Down Expand Up @@ -300,7 +300,7 @@ func (p PluginSPIImpl) listVMs(ctx context.Context, secret *corev1.Secret) (map[
func (p PluginSPIImpl) machineProviderID(ctx context.Context, secret *corev1.Secret, virtualMachineName, namespace string) (string, error) {
virtualMachine, err := p.getVM(ctx, secret, virtualMachineName, namespace)
if err != nil {
return "", fmt.Errorf("failed to get virtualMachine: %v", err)
return "", err
}

return encodeProviderID(string(virtualMachine.UID)), nil
Expand Down

0 comments on commit 1f3792a

Please sign in to comment.