Stop invalid calls to Registry

This code was resulting in a call for
/v1/images/<namespace>/<repository>/ancestry which the Registry
doesn't understand. Furthermore, it was masking the original
error.
Upstream-commit: d47507791e14908e78cf38d415a9863c9ef75c5e
Component: engine
This commit is contained in:
Danny Yates
2013-11-28 16:43:28 +00:00
parent 28b7c6878a
commit 752dcb1a87
+1 -8
View File
@@ -1011,16 +1011,9 @@ func (srv *Server) ImagePull(localName string, tag string, out io.Writer, sf *ut
localName = remoteName
}
err = srv.pullRepository(r, out, localName, remoteName, tag, endpoint, sf, parallel)
if err == registry.ErrLoginRequired {
if err = srv.pullRepository(r, out, localName, remoteName, tag, endpoint, sf, parallel); err != nil {
return err
}
if err != nil {
if err := srv.pullImage(r, out, remoteName, endpoint, nil, sf); err != nil {
return err
}
return nil
}
return nil
}