summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoger Camargo <huogerac@gmail.com>2021-06-03 09:33:24 -0300
committerRoger Camargo <huogerac@gmail.com>2021-06-03 09:40:50 -0300
commitd58ca9720725219fd25a4145b8b5adbe1ed2ebc5 (patch)
tree046faa5766b116f47d281ec39512fa5492816382
parent96c12726fdb9b24e985b4de74d5c82145ccd8185 (diff)
downloaddocker-py-d58ca9720725219fd25a4145b8b5adbe1ed2ebc5.tar.gz
[DOCS] Update the Image.save documentation with a working example. Issue #836
Signed-off-by: Roger Camargo <huogerac@gmail.com>
-rw-r--r--docker/models/images.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/docker/models/images.py b/docker/models/images.py
index e635588..28cfc93 100644
--- a/docker/models/images.py
+++ b/docker/models/images.py
@@ -84,9 +84,9 @@ class Image(Model):
Example:
- >>> image = cli.get_image("busybox:latest")
+ >>> image = cli.images.get("busybox:latest")
>>> f = open('/tmp/busybox-latest.tar', 'wb')
- >>> for chunk in image:
+ >>> for chunk in image.save():
>>> f.write(chunk)
>>> f.close()
"""