mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 15:31:15 -05:00
Fixes to the delete letter notifications.
If there are no files to delete we won't get an excpetion. Wrap the delete file in a try/except to avoid stopping the entire task. Fix the missing slash for the file name.
This commit is contained in:
@@ -61,7 +61,8 @@ def get_s3_bucket_objects(bucket_name, subfolder='', older_than=7, limit_days=2)
|
||||
|
||||
all_objects_in_bucket = []
|
||||
for page in page_iterator:
|
||||
all_objects_in_bucket.extend(page['Contents'])
|
||||
if page.get('Contents'):
|
||||
all_objects_in_bucket.extend(page['Contents'])
|
||||
|
||||
return all_objects_in_bucket
|
||||
|
||||
|
||||
Reference in New Issue
Block a user