From ebd8b12e15afa4d76d1d503140a67cdb6ad7fbd9 Mon Sep 17 00:00:00 2001 From: Abhijit Menon-Sen Date: Sun, 11 Oct 2015 07:07:37 +0530 Subject: [PATCH] Add missing variable initializations MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Without this, «ec2: state=stopped instance_ids=…» would fail with a traceback like this: if inst.get_attribute('sourceDestCheck')['sourceDestCheck'] != source_dest_check: NameError: global name 'source_dest_check' is not defined --- cloud/amazon/ec2.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cloud/amazon/ec2.py b/cloud/amazon/ec2.py index 6572a9286f4..f4605b4b442 100644 --- a/cloud/amazon/ec2.py +++ b/cloud/amazon/ec2.py @@ -1226,6 +1226,8 @@ def startstop_instances(module, ec2, instance_ids, state, instance_tags): wait = module.params.get('wait') wait_timeout = int(module.params.get('wait_timeout')) + source_dest_check = module.params.get('source_dest_check') + termination_protection = module.params.get('termination_protection') changed = False instance_dict_array = []