mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-29 14:37:00 +00:00
Merge pull request #8021 from ddysher/kubelet-fix
Use error type from docker go-client instead of string
This commit is contained in:
commit
36163969ef
@ -157,9 +157,7 @@ func (p dockerPuller) IsImagePresent(image string) (bool, error) {
|
||||
if err == nil {
|
||||
return true, nil
|
||||
}
|
||||
// This is super brittle, but its the best we got.
|
||||
// TODO: Land code in the docker client to use docker.Error here instead.
|
||||
if err.Error() == "no such image" {
|
||||
if err == docker.ErrNoSuchImage {
|
||||
return false, nil
|
||||
}
|
||||
return false, err
|
||||
|
Loading…
Reference in New Issue
Block a user