Fix downloading file from s3

This commit is contained in:
Ivan Vazhenin
2023-11-10 09:50:51 +07:00
parent 3fd2ec4762
commit 45b04a635b

View File

@@ -300,7 +300,9 @@ def replication(bnd_name: str, commit_id: str, schema: str):
'bucket': x.bucket,
'filename': x.fileName,
})
download_file(x.key, x.bucket, os.path.join(z.dirname, x.key))
fp = os.path.join(z.dirname, x.key)
os.makedirs(os.path.dirname(fp), exist_ok=True)
download_file(x.key, x.bucket, fp)
with open(os.path.join(z.dirname, 'export_files.json'), 'w') as f:
f.write(json.dumps(exported_files))
ws.clearData(True)