Cleanup pullSchema2

Signed-off-by: Qiang Huang <h.huangqiang@huawei.com>
Upstream-commit: cec0e2dfbddac0bf1362cfbfc94d8d4003c7da36
Component: engine
This commit is contained in:
Qiang Huang
2016-09-05 15:02:14 +08:00
parent 509edc829c
commit eae30caa81
+3 -9
View File
@@ -559,10 +559,6 @@ func (p *v2Puller) pullSchema2(ctx context.Context, ref reference.Named, mfst *s
rootFS, release, err := p.config.DownloadManager.Download(ctx, downloadRootFS, descriptors, p.config.ProgressOutput)
if err != nil {
if configJSON != nil {
// Already received the config
return "", "", err
}
select {
case err = <-errChan:
return "", "", err
@@ -577,11 +573,9 @@ func (p *v2Puller) pullSchema2(ctx context.Context, ref reference.Named, mfst *s
}
defer release()
if configJSON == nil {
configJSON, unmarshalledConfig, err = receiveConfig(configChan, errChan)
if err != nil {
return "", "", err
}
configJSON, unmarshalledConfig, err = receiveConfig(configChan, errChan)
if err != nil {
return "", "", err
}
if unmarshalledConfig.RootFS == nil {