Skip to content

Commit

Permalink
Merge pull request #85 from Shreyanand/extend-pipeline
Browse files Browse the repository at this point in the history
Fix Image env. for pipeline to work
  • Loading branch information
oindrillac authored Nov 2, 2021
2 parents c26a3d8 + f58142a commit 1aa312c
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/data/s3_communication.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,8 @@ def download_files_in_prefix_to_dir(self, s3_prefix, destination_dir):
# download files at the root of this prefix
for file in result.get("Contents", []):
dest_filename = osp.basename(file.get("Key"))
dest_pathname = osp.join(destination_dir, dest_filename)
if not osp.exists(osp.dirname(dest_pathname)):
os.makedirs(osp.dirname(dest_pathname))
self.download_file_from_s3(dest_pathname, s3_prefix, dest_filename)
if dest_filename:
dest_pathname = osp.join(destination_dir, dest_filename)
if not osp.exists(osp.dirname(dest_pathname)):
os.makedirs(osp.dirname(dest_pathname))
self.download_file_from_s3(dest_pathname, s3_prefix, dest_filename)

0 comments on commit 1aa312c

Please sign in to comment.