From 11cd09513154a2d505755ccc266d33b2e6d4127a Mon Sep 17 00:00:00 2001 From: Kush Bavishi Date: Wed, 31 Jul 2019 11:12:28 -0700 Subject: [PATCH] Reduced the number of calls to get_public_authoritative_nameserver by using a variable --- lemur/plugins/lemur_acme/ultradns.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lemur/plugins/lemur_acme/ultradns.py b/lemur/plugins/lemur_acme/ultradns.py index d3b68afc..d516be1a 100644 --- a/lemur/plugins/lemur_acme/ultradns.py +++ b/lemur/plugins/lemur_acme/ultradns.py @@ -129,8 +129,9 @@ def wait_for_dns_change(change_id, account_number=None): break time.sleep(10) if status: + nameserver = get_public_authoritative_nameserver() for attempts in range(0, number_of_attempts): - status = _has_dns_propagated(fqdn, token, get_public_authoritative_nameserver()) + status = _has_dns_propagated(fqdn, token, nameserver) function = sys._getframe().f_code.co_name log_data = { "function": function,