Skip to content

Commit

Permalink
Merge pull request #12473 from weizhanxu/consistent_return_val
Browse files Browse the repository at this point in the history
Merged by openshift-bot
  • Loading branch information
OpenShift Bot authored Jan 14, 2017
2 parents 843f15c + e249de9 commit 4d6e336
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/build/registry/rest.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,14 +43,14 @@ func WaitForRunningBuild(watcher rest.Watcher, ctx kapi.Context, build *api.Buil
observed = obj

if event.Type == watch.Deleted {
return obj, false, ErrBuildDeleted
return observed, false, ErrBuildDeleted
}
switch obj.Status.Phase {
case api.BuildPhaseRunning, api.BuildPhaseComplete, api.BuildPhaseFailed, api.BuildPhaseError, api.BuildPhaseCancelled:
return obj, true, nil
return observed, true, nil
case api.BuildPhaseNew, api.BuildPhasePending:
default:
return obj, false, ErrUnknownBuildPhase
return observed, false, ErrUnknownBuildPhase
}
case <-expire:
return observed, false, nil
Expand Down

0 comments on commit 4d6e336

Please sign in to comment.