Log Warning when S3 ACL can't be retrieved.
If MFA is enabled on the bucket we can't retrieve the ACL. This just
logs a warning and carries on. It should also fix issue when an
ACL doesn't actually exist or has been deleted.
@@ -69,6 +69,9 @@ class S3(Watcher):
bucket = self.process_bucket(bucket_name, name=bucket_name, **kwargs)
if bucket:
+ if bucket.has_key('Error'):
+ app.logger.warn("Couldn't obtain ACL for S3 bucket {}. Error: {}".format(bucket_name, bucket['Error']))
+ else:
item = S3Item.from_slurp(bucket_name, bucket, **kwargs)
item_list.append(item)
