handle lack of etag

This commit is contained in:
Emil Lerch 2021-01-05 23:25:39 -08:00
parent 2e52dc0bac
commit 201a79e58f
Signed by: lobo
GPG Key ID: A7B62D657EF764F8

View File

@ -114,6 +114,10 @@ def lambda_handler(event, context):
for future in as_completed(rs):
try:
result = future.result()
if 'etag' not in result.headers:
printerr('WARNING: Will not process, no etag found for %s' %
rsdict[future]['url'])
break
current_etag = result.headers['etag']
prior_etag = None
if rsdict[future]['url'] in existing_etags: