diff --git a/changelogs/fragments/1607-NoSuchTagSet.yml b/changelogs/fragments/1607-NoSuchTagSet.yml new file mode 100644 index 00000000000..63aff3bb5c7 --- /dev/null +++ b/changelogs/fragments/1607-NoSuchTagSet.yml @@ -0,0 +1,2 @@ +bugfixes: +- s3_object - fixed ``NoSuchTagSet`` error when S3 endpoint doesn't support tags (https://github.com/ansible-collections/amazon.aws/issues/1607). diff --git a/plugins/modules/s3_object.py b/plugins/modules/s3_object.py index a0d2d04b74b..8b710f3c1c0 100644 --- a/plugins/modules/s3_object.py +++ b/plugins/modules/s3_object.py @@ -900,7 +900,7 @@ def get_current_object_tags_dict(module, s3, bucket, obj, version=None): except is_boto3_error_code(IGNORE_S3_DROP_IN_EXCEPTIONS): module.warn("GetObjectTagging is not implemented by your storage provider.") return {} - except is_boto3_error_code(("NoSuchTagSet", "NoSuchTagSetError")): + except is_boto3_error_code(["NoSuchTagSet", "NoSuchTagSetError"]): return {} return boto3_tag_list_to_ansible_dict(current_tags)