mirror of https://github.com/docker/docker-py.git
Fix file mode in image.save examples
Signed-off-by: Joffrey F <joffrey@docker.com>
This commit is contained in:
parent
cebdee4aef
commit
852d79b08d
|
@ -32,7 +32,7 @@ class ImageApiMixin(object):
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
>>> image = cli.get_image("busybox:latest")
|
>>> image = cli.get_image("busybox:latest")
|
||||||
>>> f = open('/tmp/busybox-latest.tar', 'w')
|
>>> f = open('/tmp/busybox-latest.tar', 'wb')
|
||||||
>>> for chunk in image:
|
>>> for chunk in image:
|
||||||
>>> f.write(chunk)
|
>>> f.write(chunk)
|
||||||
>>> f.close()
|
>>> f.close()
|
||||||
|
|
|
@ -84,7 +84,7 @@ class Image(Model):
|
||||||
Example:
|
Example:
|
||||||
|
|
||||||
>>> image = cli.get_image("busybox:latest")
|
>>> image = cli.get_image("busybox:latest")
|
||||||
>>> f = open('/tmp/busybox-latest.tar', 'w')
|
>>> f = open('/tmp/busybox-latest.tar', 'wb')
|
||||||
>>> for chunk in image:
|
>>> for chunk in image:
|
||||||
>>> f.write(chunk)
|
>>> f.write(chunk)
|
||||||
>>> f.close()
|
>>> f.close()
|
||||||
|
|
Loading…
Reference in New Issue