mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-04-01 08:13:08 +00:00
This commit is contained in:
committed by
Matt Davis
parent
2fee9ca0dc
commit
dba8edf735
@@ -398,9 +398,9 @@ class ImageManager(DockerBaseClass):
|
||||
self.fail("Error getting image %s - %s" % (image_name, str(exc)))
|
||||
|
||||
try:
|
||||
image_tar = open(self.archive_path, 'w')
|
||||
image_tar.write(image.data)
|
||||
image_tar.close()
|
||||
with open(self.archive_path, 'w') as fd:
|
||||
for chunk in image.stream(2048, decode_content=False):
|
||||
fd.write(chunk)
|
||||
except Exception as exc:
|
||||
self.fail("Error writing image archive %s - %s" % (self.archive_path, str(exc)))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user