mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-03 17:30:00 +00:00
Use error type from docker go-client instead of string
This commit is contained in:
parent
738f403eea
commit
72a563f618
@ -157,9 +157,7 @@ func (p dockerPuller) IsImagePresent(image string) (bool, error) {
|
|||||||
if err == nil {
|
if err == nil {
|
||||||
return true, nil
|
return true, nil
|
||||||
}
|
}
|
||||||
// This is super brittle, but its the best we got.
|
if err == docker.ErrNoSuchImage {
|
||||||
// TODO: Land code in the docker client to use docker.Error here instead.
|
|
||||||
if err.Error() == "no such image" {
|
|
||||||
return false, nil
|
return false, nil
|
||||||
}
|
}
|
||||||
return false, err
|
return false, err
|
||||||
|
Loading…
Reference in New Issue
Block a user