mirror of
https://github.com/ansible-collections/community.docker.git
synced 2026-07-29 11:55:04 +00:00
Prepare 5.0.0 (#1123)
* Bump version to 5.0.0-a1. * Drop support for ansible-core 2.15 and 2.16. * Remove Python 2 and early Python 3 compatibility.
This commit is contained in:
@@ -37,8 +37,7 @@ def write_imitation_archive(file_name, image_id, repo_tags):
|
||||
|
||||
|
||||
def write_imitation_archive_with_manifest(file_name, manifest):
|
||||
tf = tarfile.open(file_name, 'w')
|
||||
try:
|
||||
with tarfile.open(file_name, 'w') as tf:
|
||||
with TemporaryFile() as f:
|
||||
f.write(json.dumps(manifest).encode('utf-8'))
|
||||
|
||||
@@ -48,10 +47,6 @@ def write_imitation_archive_with_manifest(file_name, manifest):
|
||||
f.seek(0)
|
||||
tf.addfile(ti, f)
|
||||
|
||||
finally:
|
||||
# In Python 2.6, this does not have __exit__
|
||||
tf.close()
|
||||
|
||||
|
||||
def write_irrelevant_tar(file_name):
|
||||
'''
|
||||
|
||||
Reference in New Issue
Block a user