From daca7fa584a6ef6ad40fddabf53dd4b211bb7963 Mon Sep 17 00:00:00 2001 From: Tyler Schwend Date: Thu, 4 Apr 2019 22:09:48 -0400 Subject: [PATCH] fix: return a list, specifically (#54537) tags.keys() returns a list of the keys, sure. But in Python 3 it's a "dict_keys" class, and BOTO is expecting a list. So let's make this work in Python 3. list(tags) returns a list of the keys in Python 2 and Python3. That seems to be what we want. --- lib/ansible/modules/cloud/amazon/kinesis_stream.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/amazon/kinesis_stream.py b/lib/ansible/modules/cloud/amazon/kinesis_stream.py index 2cb1e8f625..f633ff0879 100644 --- a/lib/ansible/modules/cloud/amazon/kinesis_stream.py +++ b/lib/ansible/modules/cloud/amazon/kinesis_stream.py @@ -477,7 +477,7 @@ def tags_action(client, stream_name, tags, action='create', check_mode=False): client.add_tags_to_stream(**params) success = True elif action == 'delete': - params['TagKeys'] = tags.keys() + params['TagKeys'] = list(tags) client.remove_tags_from_stream(**params) success = True else: