Skip to content

Commit

Permalink
Remove unnecessary check
Browse files Browse the repository at this point in the history
Signed-off-by: Carlisia <carlisia@vmware.com>
  • Loading branch information
Carlisia committed Mar 26, 2021
1 parent 6decba9 commit e498a23
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions pkg/cmd/cli/uninstall/uninstall.go
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ func Run(ctx context.Context, client *kubernetes.Clientset, extensionsClient *ap
defer cancel()

checkFunc := func() {
ns, err := client.CoreV1().Namespaces().Get(ctx, namespace, metav1.GetOptions{})
_, err := client.CoreV1().Namespaces().Get(ctx, namespace, metav1.GetOptions{})
if err != nil {
if apierrors.IsNotFound(err) {
fmt.Print("\n")
Expand All @@ -156,10 +156,7 @@ func Run(ctx context.Context, client *kubernetes.Clientset, extensionsClient *ap
}
errs = append(errs, errors.WithStack(err))
}

if ns.Status.Phase == corev1.NamespaceTerminating {
fmt.Print(".")
}
fmt.Print(".")
}

wait.Until(checkFunc, 5*time.Millisecond, ctx.Done())
Expand Down

0 comments on commit e498a23

Please sign in to comment.