initial stage
This commit is contained in:
parent
0339a92de5
commit
52dd788d15
|
@ -41,8 +41,10 @@ def s3_untar():
|
||||||
dst_key = os.path.normpath(dst_key)
|
dst_key = os.path.normpath(dst_key)
|
||||||
# Ignore directories, links, devices, fifos, etc.
|
# Ignore directories, links, devices, fifos, etc.
|
||||||
if (not member.isfile()) or member.name.endswith('/'):
|
if (not member.isfile()) or member.name.endswith('/'):
|
||||||
print(f"Skipping {member.name}")
|
print(f"Skipping {member.name}: is not a file")
|
||||||
continue
|
continue
|
||||||
|
if hook.check_for_key(key=dst_key, bucket_name=context["params"]["dst_bucket"]):
|
||||||
|
print(f"Skipping {member.name}: already exists")
|
||||||
print(f"Extracting {member.name} to {dst_key}")
|
print(f"Extracting {member.name} to {dst_key}")
|
||||||
fileobj = tar.extractfile(member)
|
fileobj = tar.extractfile(member)
|
||||||
fileobj.seekable = lambda: False
|
fileobj.seekable = lambda: False
|
||||||
|
|
Loading…
Reference in New Issue