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

Commit

Permalink
Don't wrap errors from unexported methods in core.go
Browse files Browse the repository at this point in the history
  • Loading branch information
stoyanr committed Aug 12, 2020
1 parent 7e4cabc commit 851ff67
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 851ff67

Please sign in to comment.