summaryrefslogtreecommitdiff
path: root/pkg/varlinkapi
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2019-04-08 10:51:55 -0700
committerGitHub <noreply@github.com>2019-04-08 10:51:55 -0700
commitc94903ab45396d04f3c94587b8f505435d0ea723 (patch)
treefa264ec0208ac25e518dfa4b7c28238600647a55 /pkg/varlinkapi
parent93790b2c6b68550e60376e142c973da00646c9dd (diff)
parent340c6cfb7224a49ee202c60912fbe09e244ba31f (diff)
downloadpodman-c94903ab45396d04f3c94587b8f505435d0ea723.tar.gz
podman-c94903ab45396d04f3c94587b8f505435d0ea723.tar.bz2
podman-c94903ab45396d04f3c94587b8f505435d0ea723.zip
Merge pull request #2861 from baude/varlinkimagepanic
Correct varlink pull panic
Diffstat (limited to 'pkg/varlinkapi')
-rw-r--r--pkg/varlinkapi/images.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/pkg/varlinkapi/images.go b/pkg/varlinkapi/images.go
index 95aa1b335..470eadaeb 100644
--- a/pkg/varlinkapi/images.go
+++ b/pkg/varlinkapi/images.go
@@ -628,7 +628,6 @@ func (i *LibpodAPI) PullImage(call iopodman.VarlinkCall, name string, certDir, c
output := bytes.NewBuffer([]byte{})
c := make(chan error)
go func() {
- //err := newImage.PushImageToHeuristicDestination(getContext(), destname, manifestType, "", signaturePolicy, output, compress, so, &dockerRegistryOptions, nil)
if strings.HasPrefix(name, dockerarchive.Transport.Name()+":") {
srcRef, err := alltransports.ParseImageName(name)
if err != nil {
@@ -637,14 +636,16 @@ func (i *LibpodAPI) PullImage(call iopodman.VarlinkCall, name string, certDir, c
newImage, err := i.Runtime.ImageRuntime().LoadFromArchiveReference(getContext(), srcRef, signaturePolicy, output)
if err != nil {
c <- errors.Wrapf(err, "error pulling image from %q", name)
+ } else {
+ imageID = newImage[0].ID()
}
- imageID = newImage[0].ID()
} else {
newImage, err := i.Runtime.ImageRuntime().New(getContext(), name, signaturePolicy, "", output, &dockerRegistryOptions, so, false, nil)
if err != nil {
c <- errors.Wrapf(err, "unable to pull %s", name)
+ } else {
+ imageID = newImage.ID()
}
- imageID = newImage.ID()
}
c <- nil
close(c)