From d30fb45b52aa2e6065a44384e10b08d927763cc9 Mon Sep 17 00:00:00 2001 From: badra001 Date: Thu, 7 Aug 2025 12:57:22 -0400 Subject: [PATCH] fix Route53.Client.exceptions.* to route53.exceptions.* --- code/ddns-lambda.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/code/ddns-lambda.py b/code/ddns-lambda.py index d001923..02b131d 100755 --- a/code/ddns-lambda.py +++ b/code/ddns-lambda.py @@ -73,7 +73,7 @@ LOGGER = logging.getLogger() account_id = None region = None -VERSION = '2.0.6' +VERSION = '2.0.7' # Read Env variables DEBUG_LOG_LEVEL = os.environ.get('DebugLogLevel', 'INFO') @@ -1749,7 +1749,7 @@ def new_change_resource_recordset(oclient, instance_id, zone_id, host_name, host # except ClientError as err: # LOGGER.info( # f"exception: {instance_id} err {err} sys.exc_info {sys.exc_info()[0]} {sys.exc_info()[1]} {lineno()}") - except Route53.Client.exceptions.NoSuchHostedZone as err: + except route53.exceptions.NoSuchHostedZone as err: # if 'NoSuchHostedZone' in str(err) and 'No hosted zone found with ID' in str(err): # LOGGER.error("Hosted zone not found error: %s", str(err) + lineno()) @@ -1757,7 +1757,7 @@ def new_change_resource_recordset(oclient, instance_id, zone_id, host_name, host f"exception: NoSuchHostedZone {err} sys.exc_info {sys.exc_info()[0]} {sys.exc_info()[1]} {lineno()}") update_response = "NoSuchHostedZone" break - except Route53.Client.exceptions.InvalidChangeBatch as err: + except route53.exceptions.InvalidChangeBatch as err: # elif 'InvalidChangeBatch' in str(err) and 'is not permitted in zone' in str(err): # LOGGER.error( # "Cannot create record - most likely wrong zone name specified: %s", str(err) + lineno()) @@ -1766,12 +1766,12 @@ def new_change_resource_recordset(oclient, instance_id, zone_id, host_name, host f"exception: InvalidChangeBatch {err} sys.exc_info {sys.exc_info()[0]} {sys.exc_info()[1]} {lineno()}") update_response = "InvalidChangeBatch" break - except Route53.Client.exceptions.InvalidInput as err: + except route53.exceptions.InvalidInput as err: LOGGER.info( f"exception: InvalidInput {err} sys.exc_info {sys.exc_info()[0]} {sys.exc_info()[1]} {lineno()}") update_response = "InvalidInput" break - except Route53.Client.exceptions.PriorRequestNotComplete as err: + except route53.exceptions.PriorRequestNotComplete as err: # elif "(Throttling)" in str(err): LOGGER.info( f"exception: PriorRequestNotComplete {err} sys.exc_info {sys.exc_info()[0]} {sys.exc_info()[1]} {lineno()}")