mirror of
https://github.com/GSA/notifications-api.git
synced 2025-12-20 15:31:15 -05:00
Fix a typo error on task argument
Modify unit test to be more robust
This commit is contained in:
@@ -119,8 +119,12 @@ def get_list_of_files_by_suffix(bucket_name, subfolder='', suffix='', last_modif
|
||||
)
|
||||
|
||||
for page in page_iterator:
|
||||
for obj in page['Contents']:
|
||||
key = obj['Key'].lower()
|
||||
if key.endswith(suffix.lower()):
|
||||
if not last_modified or obj['LastModified'] >= last_modified:
|
||||
yield key
|
||||
try:
|
||||
for obj in page['Contents']:
|
||||
key = obj['Key'].lower()
|
||||
if key.endswith(suffix.lower()):
|
||||
if not last_modified or obj['LastModified'] >= last_modified:
|
||||
yield key
|
||||
except KeyError:
|
||||
# Not content for today
|
||||
pass
|
||||
|
||||
Reference in New Issue
Block a user