From e9b5e14764d9ee713c0d29dd08e92746fe9f6187 Mon Sep 17 00:00:00 2001 From: "Ryan S. Brown" Date: Tue, 7 Nov 2017 09:30:47 -0500 Subject: [PATCH] [cloud] sns_topic: Fix unreferenced variable Cherry-pick of 4e759a9cced30401301530f7f5b3ffefbb58b9db --- CHANGELOG.md | 2 ++ lib/ansible/modules/cloud/amazon/sns_topic.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c7c97e3c03..e0493b4961 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -138,6 +138,8 @@ Ansible Changes By Release (https://github.com/ansible/ansible/pull/32203) * Fix for validating proxy results on Python3 for modules making http requests: (https://github.com/ansible/ansible/pull/32596) +* Fix unreferenced variable in SNS topic module + (https://github.com/ansible/ansible/pull/29117) diff --git a/lib/ansible/modules/cloud/amazon/sns_topic.py b/lib/ansible/modules/cloud/amazon/sns_topic.py index 7c8385c7f6..e0e3ae6a52 100644 --- a/lib/ansible/modules/cloud/amazon/sns_topic.py +++ b/lib/ansible/modules/cloud/amazon/sns_topic.py @@ -280,7 +280,7 @@ class SnsTopicManager(object): for (protocol, endpoint) in desired_subscriptions: if (protocol, endpoint) not in subscriptions_existing_list: self.changed = True - self.subscriptions_added.append(sub) + self.subscriptions_added.append((protocol, endpoint)) if not self.check_mode: self.connection.subscribe(self.arn_topic, protocol, endpoint)