From e638913c9740421671f24a77df4531e495649464 Mon Sep 17 00:00:00 2001 From: Patrick Roby Date: Thu, 25 Jun 2015 10:37:17 -0700 Subject: [PATCH] iterate through all keys in a more pythonic manner --- lib/ansible/modules/cloud/amazon/s3.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/ansible/modules/cloud/amazon/s3.py b/lib/ansible/modules/cloud/amazon/s3.py index 93b13f0a774..2601ac4e2cb 100644 --- a/lib/ansible/modules/cloud/amazon/s3.py +++ b/lib/ansible/modules/cloud/amazon/s3.py @@ -237,7 +237,7 @@ def get_bucket(module, s3, bucket): def list_keys(module, bucket_object, prefix, marker, max_keys): all_keys = bucket_object.get_all_keys(prefix=prefix, marker=marker, max_keys=max_keys) - keys = map((lambda x: x.key), all_keys) + keys = [x.key for x in all_keys] module.exit_json(msg="LIST operation complete", s3_keys=keys)