Skip to content

Commit

Permalink
fix: remove unnecessary exception judgments
Browse files Browse the repository at this point in the history
  • Loading branch information
liuxinbot committed Apr 15, 2022
1 parent 70d2c70 commit 6dd4f0a
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions pkg/controllers/statefulapp/core/pod_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,14 +110,12 @@ func (ctrl *PodCtrl) CreatePod(subset cloudv1.Subset) error {
}

// update status
if err == nil {
err = UpdateStatus(ctrl.Resource, ctrl.StatefulApp)
if err != nil {
return err
}
err = UpdateStatus(ctrl.Resource, ctrl.StatefulApp)
if err != nil {
return err
}

return err
return nil
}

func (ctrl *PodCtrl) GetPodsByLables(namespace string, listOption client.ListOption) []corev1.Pod {
Expand Down

0 comments on commit 6dd4f0a

Please sign in to comment.