Skip to content

Commit

Permalink
fix ignore_nonexistent_bucket bug for listing (ansible-collections#966)
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien Simbola committed Aug 11, 2022
1 parent ffd8c1a commit 32f32ca
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Bugfixes
- elb_application_lb - fix ``KeyError`` when balancing across two Target Groups (https://github.com/ansible-collections/community.aws/issues/1089).
- elb_classic_lb - fix ``'NoneType' object has no attribute`` bug when creating a new ELB in check mode with a health check (https://github.com/ansible-collections/amazon.aws/pull/915).
- elb_classic_lb - fix ``'NoneType' object has no attribute`` bug when creating a new ELB using security group names (https://github.com/ansible-collections/amazon.aws/issues/914).
- s3_object - fix ignore_nonexistent_bucket is not used when listing a bucket (https://github.com/ansible-collections/amazon.aws/issues/966).

v4.0.0
======
Expand Down
3 changes: 1 addition & 2 deletions plugins/modules/s3_object.py
Original file line number Diff line number Diff line change
Expand Up @@ -1168,10 +1168,9 @@ def main():

# Support for listing a set of keys
if mode == 'list':
exists = bucket_check(module, s3, bucket)

# If the bucket does not exist then bail out
if not exists:
if not bucketrtn:
module.fail_json(msg="Target bucket (%s) cannot be found" % bucket)

list_keys(module, s3, bucket, prefix, marker, max_keys)
Expand Down

0 comments on commit 32f32ca

Please sign in to comment.