Skip to content

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
alkalescent authored Aug 13, 2020
1 parent aaac177 commit 1cd36b1
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions src/Storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,11 @@ def upload_dir(self, path, truncate=False):
p.map(self.upload_file, paths)

def delete_objects(self, keys):
objects = [{'Key': key} for key in keys]
s3 = boto3.resource('s3')
bucket = s3.Bucket(self.bucket_name)
bucket.delete_objects(Delete={'Objects': objects})
if keys:
objects = [{'Key': key} for key in keys]
s3 = boto3.resource('s3')
bucket = s3.Bucket(self.bucket_name)
bucket.delete_objects(Delete={'Objects': objects})

def get_all_keys(self):
s3 = boto3.resource('s3')
Expand Down

0 comments on commit 1cd36b1

Please sign in to comment.