Parse acknowledgement files against .ZIP.TXT created by ftp app.

- Also convert the files info to upper() for comparison rather than lower
because original file names are in upper case. The unit tests contain examples of the returned lists.
This commit is contained in:
venusbb
2018-01-18 10:44:36 +00:00
parent dec8a191a3
commit 8f5a5f8105
3 changed files with 26 additions and 14 deletions

View File

@@ -120,7 +120,7 @@ def get_list_of_files_by_suffix(bucket_name, subfolder='', suffix='', last_modif
for page in page_iterator:
for obj in page.get('Contents', []):
key = obj['Key'].lower()
if key.endswith(suffix.lower()):
key = obj['Key']
if key.lower().endswith(suffix.lower()):
if not last_modified or obj['LastModified'] >= last_modified:
yield key