stream_layered_image: Use more descriptive variable name
This commit is contained in:
parent
4bff5b7f3d
commit
87a538e149
@ -160,9 +160,9 @@ def add_layer_dir(tar, paths, mtime, add_nix=True, filter=None):
|
|||||||
(checksum, size) = extract_checksum.extract()
|
(checksum, size) = extract_checksum.extract()
|
||||||
|
|
||||||
path = f"{checksum}/layer.tar"
|
path = f"{checksum}/layer.tar"
|
||||||
ti = tarfile.TarInfo(path)
|
layer_tarinfo = tarfile.TarInfo(path)
|
||||||
ti.size = size
|
layer_tarinfo.size = size
|
||||||
ti.mtime = mtime
|
layer_tarinfo.mtime = mtime
|
||||||
|
|
||||||
# Then actually stream the contents to the outer tarball.
|
# Then actually stream the contents to the outer tarball.
|
||||||
read_fd, write_fd = os.pipe()
|
read_fd, write_fd = os.pipe()
|
||||||
@ -184,7 +184,7 @@ def add_layer_dir(tar, paths, mtime, add_nix=True, filter=None):
|
|||||||
# exception handler, and the 'addfile' call will fail since it
|
# exception handler, and the 'addfile' call will fail since it
|
||||||
# won't be able to read required amount of bytes.
|
# won't be able to read required amount of bytes.
|
||||||
threading.Thread(target=producer).start()
|
threading.Thread(target=producer).start()
|
||||||
tar.addfile(ti, read)
|
tar.addfile(layer_tarinfo, read)
|
||||||
|
|
||||||
return LayerInfo(size=size, checksum=checksum, path=path, paths=paths)
|
return LayerInfo(size=size, checksum=checksum, path=path, paths=paths)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user