stream_layered_image: Add main method

This commit is contained in:
Utku Demir 2020-06-21 11:46:15 +12:00
parent 307804d97d
commit 26402290bf
No known key found for this signature in database
GPG Key ID: F3F8629C3E0BF60B

View File

@ -181,8 +181,7 @@ def add_bytes(tar, path, content, mtime):
tar.addfile(ti, io.BytesIO(content))
# Main
def main():
with open(sys.argv[1], "r") as f:
conf = json.load(f)
@ -248,3 +247,7 @@ with tarfile.open(mode="w|", fileobj=sys.stdout.buffer) as tar:
add_bytes(tar, "manifest.json", manifest_json, mtime=mtime)
print("Done.", file=sys.stderr)
if __name__ == "__main__":
main()