initial stage

This commit is contained in:
Giambattista Bloisi 2024-06-10 09:28:36 +02:00
parent d7e3e7a1b7
commit fe50bf1475
1 changed files with 8 additions and 4 deletions

View File

@ -39,11 +39,15 @@ def s3_untar():
for member in tar:
dst_key = context["params"]["dst_key_prefix"] + member.name
dst_key = dst_key.replace('//', '/')
# Ignore directories, links, devices, fifos, etc.
if not member.isfile():
print(f"Skipping {member.name} to {dst_key}")
continue
print(f"Extracting {member.name} to {dst_key}")
hook.load_file_obj(tar.extractfile(member),
dst_key,
context["params"]["dst_bucket"],
replace=True)
#hook.load_file_obj(tar.extractfile(member),
# dst_key,
# context["params"]["dst_bucket"],
# replace=True)
untar()