From 59bd10633013f602f635ad7bfef3bb3e1bdfa76b Mon Sep 17 00:00:00 2001 From: Josh Carlson Date: Thu, 5 Sep 2024 13:08:02 -0400 Subject: [PATCH] Fix `UnboundLocalError` exception --- utils/utils_aws.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/utils/utils_aws.py b/utils/utils_aws.py index 80ade6d..c66b4c8 100644 --- a/utils/utils_aws.py +++ b/utils/utils_aws.py @@ -123,9 +123,11 @@ def list_hosted_zones(account): def list_resource_record_sets(account_id, account_name, hosted_zone_id): + record_set_list = [] boto3_session = assume_role(account_id) route53 = boto3_session.client("route53") + try: paginator_records = route53.get_paginator("list_resource_record_sets") pages_records = paginator_records.paginate(