Use error type from docker go-client instead of string

This commit is contained in:
Deyuan Deng 2015-05-09 15:20:45 -04:00 committed by Deyuan Deng
parent 738f403eea
commit 72a563f618

View File

@ -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