From 46ca2b8bcd570fd8eb825d622283164c83908869 Mon Sep 17 00:00:00 2001 From: Adam Chainz Date: Mon, 5 Dec 2016 18:23:53 +0000 Subject: [PATCH] Cloudformation - remove dead invoke_with_throttling_retries function (#5690) Unused since f040d63403f6c459a278918fa48fa8cb87754506. --- lib/ansible/modules/cloud/amazon/cloudformation.py | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/lib/ansible/modules/cloud/amazon/cloudformation.py b/lib/ansible/modules/cloud/amazon/cloudformation.py index 6c6a117e92..582e7346ce 100644 --- a/lib/ansible/modules/cloud/amazon/cloudformation.py +++ b/lib/ansible/modules/cloud/amazon/cloudformation.py @@ -348,20 +348,6 @@ def get_stack_facts(cfn, stack_name): return stack_info -IGNORE_CODE = 'Throttling' -MAX_RETRIES=3 -def invoke_with_throttling_retries(function_ref, *argv, **kwargs): - retries=0 - while True: - try: - retval=function_ref(*argv, **kwargs) - return retval - except Exception as e: - # boto way of looking for retries - #if e.code != IGNORE_CODE or retries==MAX_RETRIES: - raise e - time.sleep(5 * (2**retries)) - retries += 1 def main(): argument_spec = ansible.module_utils.ec2.ec2_argument_spec()