summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDamir Suleymanov <bitle@users.noreply.github.com>2017-06-20 16:49:05 -0400
committeransibot <ansibot@users.noreply.github.com>2017-06-20 16:49:05 -0400
commit74f6b64fb06762b934c71e65ffece526f08399ff (patch)
treea51339e070dccb62c731fec65e0f18031477da75
parenta457c2af59b6b64e66d8e45a64e4a59c35e629a8 (diff)
downloadansible-74f6b64fb06762b934c71e65ffece526f08399ff.tar.gz
Handle rate limits on every iteration (#23726)
-rw-r--r--lib/ansible/modules/cloud/amazon/route53.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/ansible/modules/cloud/amazon/route53.py b/lib/ansible/modules/cloud/amazon/route53.py
index 8055f211d5..59cf9366e3 100644
--- a/lib/ansible/modules/cloud/amazon/route53.py
+++ b/lib/ansible/modules/cloud/amazon/route53.py
@@ -521,7 +521,12 @@ def main():
sets = invoke_with_throttling_retries(conn.get_all_rrsets, zone.id, name=record_in,
type=type_in, identifier=identifier_in)
- for rset in sets:
+ sets_iter = iter(sets)
+ while True:
+ try:
+ rset = invoke_with_throttling_retries(next, sets_iter)
+ except StopIteration:
+ break
# Due to a bug in either AWS or Boto, "special" characters are returned as octals, preventing round
# tripping of things like * and @.
decoded_name = rset.name.replace(r'\052', '*')