Skip to content

Commit

Permalink
Merge pull request #2851 from huogerac/issue836_better_docs
Browse files Browse the repository at this point in the history
Update the Image.save documentation with a working example. Issue #836
  • Loading branch information
mat007 committed Jun 29, 2021
2 parents 96c1272 + d58ca97 commit 650aad3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docker/models/images.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,9 +84,9 @@ def save(self, chunk_size=DEFAULT_DATA_CHUNK_SIZE, named=False):
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()
"""
Expand Down

0 comments on commit 650aad3

Please sign in to comment.