summaryrefslogtreecommitdiff
path: root/docker/api/container.py
diff options
context:
space:
mode:
Diffstat (limited to 'docker/api/container.py')
-rw-r--r--docker/api/container.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/docker/api/container.py b/docker/api/container.py
index b08032c..49230c7 100644
--- a/docker/api/container.py
+++ b/docker/api/container.py
@@ -698,7 +698,7 @@ class ContainerApiMixin(object):
container (str): The container to export
Returns:
- (str): The filesystem tar archive
+ (generator): The archived filesystem data stream
Raises:
:py:class:`docker.errors.APIError`
@@ -707,8 +707,7 @@ class ContainerApiMixin(object):
res = self._get(
self._url("/containers/{0}/export", container), stream=True
)
- self._raise_for_status(res)
- return res.raw
+ return self._stream_raw_result(res)
@utils.check_resource('container')
@utils.minimum_version('1.20')
@@ -737,7 +736,7 @@ class ContainerApiMixin(object):
self._raise_for_status(res)
encoded_stat = res.headers.get('x-docker-container-path-stat')
return (
- res.raw,
+ self._stream_raw_result(res),
utils.decode_json_header(encoded_stat) if encoded_stat else None
)