summaryrefslogtreecommitdiff
path: root/pkg/bindings
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-04-03 22:41:18 +0200
committerGitHub <noreply@github.com>2020-04-03 22:41:18 +0200
commit35f586783388cdff6b4f15e7aff4df1ee72d9b67 (patch)
tree3d44eed09f7dca13f9c152468b55ee2968e5f6b8 /pkg/bindings
parent64cade0f71a8189403d208cbc7dc8716008229be (diff)
parent837aad724ff1f7f4cc3b125b8b3419af29cd4982 (diff)
downloadpodman-35f586783388cdff6b4f15e7aff4df1ee72d9b67.tar.gz
podman-35f586783388cdff6b4f15e7aff4df1ee72d9b67.tar.bz2
podman-35f586783388cdff6b4f15e7aff4df1ee72d9b67.zip
Merge pull request #5672 from baude/v2save
podmanv2 save image
Diffstat (limited to 'pkg/bindings')
-rw-r--r--pkg/bindings/images/images.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/pkg/bindings/images/images.go b/pkg/bindings/images/images.go
index dcb568d6b..1b3df609b 100644
--- a/pkg/bindings/images/images.go
+++ b/pkg/bindings/images/images.go
@@ -146,11 +146,12 @@ func Export(ctx context.Context, nameOrID string, w io.Writer, format *string, c
if err != nil {
return err
}
- if err := response.Process(nil); err != nil {
+
+ if response.StatusCode/100 == 2 || response.StatusCode/100 == 3 {
+ _, err = io.Copy(w, response.Body)
return err
}
- _, err = io.Copy(w, response.Body)
- return err
+ return nil
}
// Prune removes unused images from local storage. The optional filters can be used to further