Skip to content

Commit

Permalink
Merge pull request kubernetes#30478 from dims/fix-test-pidof-take-2
Browse files Browse the repository at this point in the history
Automatic merge from submit-queue

Fix TestPidOf {procfs} - Take #2

We should not bailout when we get an error. We should continue
processing other files/directories. We were returning the
err passed in which was causing the processing to stop.

Fixes kubernetes#30377
  • Loading branch information
Kubernetes Submit Queue authored Aug 12, 2016
2 parents d933f07 + 24e8e12 commit 5992ded
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/util/procfs/procfs.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,8 @@ func PidOf(name string) []int {
pids := []int{}
filepath.Walk("/proc", func(path string, info os.FileInfo, err error) error {
if err != nil {
return err
// We should continue processing other directories/files
return nil
}
base := filepath.Base(path)
// Traverse only the directories we are interested in
Expand Down

0 comments on commit 5992ded

Please sign in to comment.