Skip to content

Commit

Permalink
Check the error before parsing the apiversion
Browse files Browse the repository at this point in the history
  • Loading branch information
yujuhong committed Apr 4, 2017
1 parent 12fbc90 commit 19c8b2f
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions pkg/kubelet/dockershim/docker_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -420,6 +420,9 @@ func (ds *dockerService) getDockerAPIVersion() (*semver.Version, error) {
} else {
dv, err = ds.getDockerVersion()
}
if err != nil {
return nil, err
}

apiVersion, err := semver.Parse(dv.APIVersion)
if err != nil {
Expand Down

0 comments on commit 19c8b2f

Please sign in to comment.