Commit 5bb42cbc authored by Kubernetes Submit Queue's avatar Kubernetes Submit Queue Committed by GitHub

Merge pull request #47828 from yiqinguo/yiqinguo_add_continue

Automatic merge from submit-queue If error continue for loop If err does not add continue, type conversion will be error. If do not add continue, pod. (* V1.Pod) may cause panic to run. **Release note**: ```release-note NONE ```
parents 5ec7701c 96c0fe9b
...@@ -506,6 +506,7 @@ func (s *podStorage) MergedState() interface{} { ...@@ -506,6 +506,7 @@ func (s *podStorage) MergedState() interface{} {
pod, err := api.Scheme.Copy(podRef) pod, err := api.Scheme.Copy(podRef)
if err != nil { if err != nil {
glog.Errorf("unable to copy pod: %v", err) glog.Errorf("unable to copy pod: %v", err)
continue
} }
pods = append(pods, pod.(*v1.Pod)) pods = append(pods, pod.(*v1.Pod))
} }
...@@ -520,6 +521,7 @@ func copyPods(sourcePods []*v1.Pod) []*v1.Pod { ...@@ -520,6 +521,7 @@ func copyPods(sourcePods []*v1.Pod) []*v1.Pod {
pod, err := api.Scheme.Copy(source) pod, err := api.Scheme.Copy(source)
if err != nil { if err != nil {
glog.Errorf("unable to copy pod: %v", err) glog.Errorf("unable to copy pod: %v", err)
continue
} }
pods = append(pods, pod.(*v1.Pod)) pods = append(pods, pod.(*v1.Pod))
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment